mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
socks5,ss: improve udp server
This commit is contained in:
1 parent
f3dc252967
commit
32e1c37cfe
6 files changed
+132
-88
No files matched your search
@@ -11,18 +11,17 @@ import (
|
||||
"github.com/nadoo/glider/proxy"
|
||||
)
|
||||
|
||||
// TProxy struct.
|
||||
type TProxy struct {
|
||||
proxy proxy.Proxy
|
||||
addr string
|
||||
}
|
||||
var nm sync.Map
|
||||
|
||||
func init() {
|
||||
proxy.RegisterServer("tproxy", NewTProxyServer)
|
||||
}
|
||||
|
||||
// nat mapping
|
||||
var nm sync.Map
|
||||
// TProxy struct.
|
||||
type TProxy struct {
|
||||
proxy proxy.Proxy
|
||||
addr string
|
||||
}
|
||||
|
||||
// NewTProxy returns a tproxy.
|
||||
func NewTProxy(s string, p proxy.Proxy) (*TProxy, error) {
|
||||
@@ -138,7 +137,6 @@ func (s *TProxy) serveSession(session *Session) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Session is a udp session
|
||||
File renamed without changes.
Reference in new issue
Block a user