This commit is contained in:
eyedeekay
2025-02-07 13:23:07 -05:00
parent 740d55fde4
commit a475fd11fe
2 changed files with 5 additions and 4 deletions

View File

@@ -12,8 +12,10 @@ import (
"github.com/txthinking/socks5" "github.com/txthinking/socks5"
) )
var socksHandler socks5.Handler = &SOCKS{} var (
var forwardConfig = config.DefaultConfig() socksHandler socks5.Handler = &SOCKS{}
forwardConfig = config.DefaultConfig()
)
// TCPHandle implements socks5.Handler. // TCPHandle implements socks5.Handler.
func (s *SOCKS) TCPHandle(_ *socks5.Server, conn *net.TCPConn, req *socks5.Request) error { func (s *SOCKS) TCPHandle(_ *socks5.Server, conn *net.TCPConn, req *socks5.Request) error {

View File

@@ -131,9 +131,8 @@ func (s *SOCKS) Start() error {
s.I2PTunnelStatus = i2ptunnel.I2PTunnelStatusStarting s.I2PTunnelStatus = i2ptunnel.I2PTunnelStatusStarting
s.Server.Handle = s s.Server.Handle = s
s.I2PTunnelStatus = i2ptunnel.I2PTunnelStatusRunning s.I2PTunnelStatus = i2ptunnel.I2PTunnelStatusRunning
s.Server.ListenAndServe(s)
return nil return s.Server.ListenAndServe(s)
} }
// Get the tunnel's status // Get the tunnel's status