mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
config: added new flag example to print usage examples
This commit is contained in:
1 parent
5cfb20562a
commit
813c5fef94
6 files changed
+146
-92
No files matched your search
@@ -51,12 +51,13 @@ func NewTrojan(s string, d proxy.Dialer, p proxy.Proxy) (*Trojan, error) {
|
||||
fallback: query.Get("fallback"),
|
||||
}
|
||||
|
||||
if _, port, _ := net.SplitHostPort(t.addr); port == "" {
|
||||
t.addr = net.JoinHostPort(t.addr, "443")
|
||||
}
|
||||
|
||||
if t.serverName == "" {
|
||||
t.serverName = t.addr[:strings.LastIndex(t.addr, ":")]
|
||||
if t.addr != "" {
|
||||
if _, port, _ := net.SplitHostPort(t.addr); port == "" {
|
||||
t.addr = net.JoinHostPort(t.addr, "443")
|
||||
}
|
||||
if t.serverName == "" {
|
||||
t.serverName = t.addr[:strings.LastIndex(t.addr, ":")]
|
||||
}
|
||||
}
|
||||
|
||||
// pass
|
||||
|
||||
Reference in new issue
Block a user