Open ne1llee opened 1 month ago
show the minimum code that can reproduce the problem
Quote reply Refere
func (p *Sock5) Start() error {
if p.status == plugins.Running {
return fmt.Errorf("is already running")
}
var options []socks5.Option
options = append(options, socks5.WithLogger(socks5.NewLogger(p.logger)))
if p.username != "" && p.password != "" {
cator := socks5.UserPassAuthenticator{Credentials: socks5.StaticCredentials{p.username: p.password}}
options = append(options, socks5.WithAuthMethods([]socks5.Authenticator{cator}))
}
p.server = socks5.NewServer(options...)
var err error
p.listener, err = net.Listen("tcp", p.address)
if err != nil {
return fmt.Errorf("failed to start: %w", err)
}
p.ctx, p.cancel = context.WithCancel(context.Background())
go func() {
if err := p.server.Serve(p.listener); err != nil {
fmt.Println("stopped:", err)
}
}()
fmt.Println("started")
return nil
}
this code can't run on my machine
The sock5 proxy service running on a device with armv7l and linux kernel version 3.10.39 cannot be accessed normally.