cfal / shoes

A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
MIT License
180 stars 17 forks source link

Supported SOCKS method not found #16

Closed megapegabot closed 1 week ago

megapegabot commented 1 week ago

hi my config:

- address: 0.0.0:1080
  protocol:
    type: socks
    username: admin
    password: admin
  rules:
    - mask: 0.0.0.0/0
      action: allow
      client_proxy: direct

im have err:

ERROR shoes::tcp_server] 172.17.0.1:56200 finished with error: 
Custom { kind: InvalidInput, error: "failed to setup server stream: 
Supported SOCKS method not found" }

request_cmd: curl -x socks5://localhost:1080 example.com

If I understand correctly, there is support for socks5, but I can’t use it

cfal commented 1 week ago

you've provided a username/password under protocol, but it's not specified in your curl command.

megapegabot commented 1 week ago

you've provided a username/password under protocol, but it's not specified in your curl command.

I made a mistake in that I specified curl without authorization, but the error also occurs with authorization

# curl -x 'socks5://localhost:1080' --user 'admin:admin' example.com
curl: (97) connection to proxy closed

ERROR shoes::tcp_server] 127.0.0.1:59104 finished with error: Custom { kind: InvalidInput, error: "failed to setup server stream: Supported SOCKS method not found" }
cfal commented 1 week ago

--user is your auth for example.com, not the proxy server. socks5://admin:admin@localhost:1080

megapegabot commented 1 week ago

--user is your auth for example.com, not the proxy server. socks5://admin:admin@localhost:1080

OMG im stupid... Sorry for disturbing you 🙏🙏