mirror of
https://github.com/go-i2p/go-i2ptunnel.git
synced 2025-12-20 15:15:52 -05:00
fmt
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user