Merge pull request #16 from rany2/master

Fix #15
This commit is contained in:
Snawoot
2021-03-06 22:26:05 +02:00
committed by GitHub

View File

@@ -104,13 +104,13 @@ func get_endpoint(tunnels *ZGetTunnelsResponse, typ string, trial bool) (string,
return "", errors.New("No tunnels found in API response")
}
var port uint16
if typ == "direct" {
if typ == "direct" || typ == "lum" {
if trial {
port = tunnels.Port.Trial
} else {
port = tunnels.Port.Direct
}
} else if typ == "peer" || typ == "lum" {
} else if typ == "peer" {
if trial {
port = tunnels.Port.TrialPeer
} else {