mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
wss: added a new scheme wss for convenience
This commit is contained in:
1 parent
a62674838e
commit
15f9e74e39
11 files changed
+166
-75
No files matched your search
@@ -55,7 +55,7 @@ func NewTrojan(s string, d proxy.Dialer, p proxy.Proxy) (*Trojan, error) {
|
||||
serverName: query.Get("serverName"),
|
||||
certFile: query.Get("cert"),
|
||||
keyFile: query.Get("key"),
|
||||
// fallback: "127.0.0.1:80",
|
||||
fallback: query.Get("fallback"),
|
||||
}
|
||||
|
||||
if _, port, _ := net.SplitHostPort(t.addr); port == "" {
|
||||
@@ -76,9 +76,5 @@ func NewTrojan(s string, d proxy.Dialer, p proxy.Proxy) (*Trojan, error) {
|
||||
hash.Write([]byte(pass))
|
||||
hex.Encode(t.pass[:], hash.Sum(nil))
|
||||
|
||||
if fb := u.Query().Get("fallback"); fb != "" {
|
||||
t.fallback = fb
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
Reference in new issue
Block a user