Fix relay_scan BuildRecommendations and ScanPorts signatures.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -92,12 +92,12 @@ func LocalRelayScan(req RelayScanRequest) (*RelayScanReport, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
ports := ScanPorts(host)
|
ports := ScanPorts(host, nil)
|
||||||
udp := GuessUDPHints(host, req.UDPGuess)
|
udp := GuessUDPHints(host, req.UDPGuess)
|
||||||
return &RelayScanReport{
|
return &RelayScanReport{
|
||||||
Host: host, ScannedAt: time.Now().UTC(), LocalReachable: true, ScannedVia: "server",
|
Host: host, ScannedAt: time.Now().UTC(), LocalReachable: true, ScannedVia: "server",
|
||||||
Ports: ports, UDPHints: udp, PathTracerHints: PathTracerHintsFromUDP(udp),
|
Ports: ports, UDPHints: udp, PathTracerHints: PathTracerHintsFromUDP(udp),
|
||||||
Recommendations: BuildRecommendations(ports, nil),
|
Recommendations: BuildRecommendations(ports, nil, nil, host, false),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ func MergeAgentRelayScan(shell RelayScanReport, agentPayload []byte, udpGuess bo
|
|||||||
shell.Ports = ports
|
shell.Ports = ports
|
||||||
shell.UDPHints = udp
|
shell.UDPHints = udp
|
||||||
shell.PathTracerHints = PathTracerHintsFromUDP(udp)
|
shell.PathTracerHints = PathTracerHintsFromUDP(udp)
|
||||||
shell.Recommendations = BuildRecommendations(ports, nil)
|
shell.Recommendations = BuildRecommendations(ports, nil, nil, shell.Host, false)
|
||||||
shell.ScannedAt = time.Now().UTC()
|
shell.ScannedAt = time.Now().UTC()
|
||||||
return &shell, nil
|
return &shell, nil
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,6 @@ func (r *RelayScanReport) ToScanReport() *ScanReport {
|
|||||||
}
|
}
|
||||||
return &ScanReport{
|
return &ScanReport{
|
||||||
Host: r.Host, ScannedAt: r.ScannedAt, Ports: r.Ports, RelayVia: relayVia,
|
Host: r.Host, ScannedAt: r.ScannedAt, Ports: r.Ports, RelayVia: relayVia,
|
||||||
UDPHints: r.UDPHints, PathTracerHints: r.PathTracerHints, Message: r.Message,
|
|
||||||
Recommendations: r.Recommendations,
|
Recommendations: r.Recommendations,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user