Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sslocal on windows EOF #790

Closed
iivankin opened this issue Mar 19, 2022 · 12 comments
Closed

sslocal on windows EOF #790

iivankin opened this issue Mar 19, 2022 · 12 comments

Comments

@iivankin
Copy link

Config

{
    "server": "redacted (plain ip adress)",
    "server_port": 443,
    "password": "redacted",
    "method": "chacha20-ietf-poly1305",
    "local_address": "127.0.0.1",
    "local_port": 1080,
    "timeout":300,
    "plugin": "ck-client",
    "plugin_opts": "cloak.json",
    "fast_open": true,
    "reuse_port": true,
    "dns": "cloudflare_https",
    "mode": "tcp_and_udp",
}

The Cloak plugin is also used:

{
  "Transport": "direct",
  "ProxyMethod": "shadowsocks",
  "EncryptionMethod": "plain",
  "UID": "redacted",
  "PublicKey": "redacted",
  "ServerName": "www.gosuslugi.ru",
  "AlternativeNames": ["mail.ru", "yandex.ru", "kremlin.ru"],
  "NumConn": 4,
  "BrowserSig": "chrome",
  "StreamTimeout": 300
}

Logs:

2022-03-19T21:50:45.570961400+03:00 INFO  [7380:3896] [shadowsocks_rust::service::local] shadowsocks local 1.14.2 build 2022-03-19T16:21:32.430938+00:00
2022-03-19T21:50:45.638146+03:00 WARN  [7380:3896] [trust_dns_resolver::hosts] could not parse an IP from hosts file
2022-03-19T21:50:45.639167700+03:00 TRACE [7380:3896] [trust_dns_resolver::async_resolver] handle passed back
2022-03-19T21:50:45.644308900+03:00 TRACE [7380:3896] [shadowsocks::plugin::ss_plugin] Starting plugin "ck-client", opt: Some("cloak.json"), arg: [], remote: redacted:443, local: 127.0.0.1:50535
2022-03-19T21:50:45.759346500+03:00 DEBUG [7380:3896] [shadowsocks::plugin] started plugin "ck-client" on 127.0.0.1:50535 <-> redacted:443 (13356)
2022-03-19T21:50:45.765882200+03:00 TRACE [7380:3896] [mio::poll] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
time="2022-03-19T21:50:45+03:00" level=info msg="Listening on TCP 127.0.0.1:50535 for shadowsocks client"
2022-03-19T21:50:46.278624100+03:00time="2022-03-19T21:50:46+03:00" level=info msg="Attempting to start a new session"
 TRACE [7380:3896] [mio::poll] deregistering event source from poller
2022-03-19T21:50:46.282093700+03:00 TRACE [7380:3896] [shadowsocks_service::local::loadbalancing::ping_balancer] init chose TCP server redacted:443
2022-03-19T21:50:46.284750300+03:00 TRACE [7380:3896] [shadowsocks_service::local::loadbalancing::ping_balancer] init chose UDP server redacted:443
2022-03-19T21:50:46.287622+03:00 TRACE [7380:3896] [mio::poll] registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE
2022-03-19T21:50:46.290220600+03:00 INFO  [7380:3896] [shadowsocks_service::local::socks::server] shadowsocks socks TCP listening on 127.0.0.1:1080
2022-03-19T21:50:46.292784300+03:00 TRACE [7380:3896] [mio::poll] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2022-03-19T21:50:46.295951+03:00 INFO  [7380:3896] [shadowsocks_service::local::socks::server::socks5::udprelay] shadowsocks socks5 UDP listening on 127.0.0.1:1080
time="2022-03-19T21:50:46+03:00" level=info msg="Session 2678198987 established"
time="2022-03-19T21:50:46+03:00" level=error msg="Failed to read first packet from proxy client: EOF"

The problem is not on the Cloak side, because if you run the exact same configuration through the С# gui client, everything works.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 20, 2022

Couldn't reproduce because I don't have UID and PublicKey.

From your Logs, I couldn't see any logs about the sslocal received requests to establish a tunnel, so why the Cloak wants to read the first packet? What's the reproduce steps?

Well, I just tried to run both sslocal and ssserver on my Laptop. The ck-client just report that ERRO[2022-03-20T12:55:30+08:00] Failed to read first packet from proxy client: EOF immediately after the process started.

But it should work fine. I tried to run curl https://www.baidu.com --socks5-hostname 127.0.0.1:1080 and everything worked fine. So I think you should open an issue to Cloak about the EOF thing.

@iivankin
Copy link
Author

Thanks
Last question. Does ss-rust send udp to plugins?

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 20, 2022

No. SIP003 didn’t mention that.

@iivankin
Copy link
Author

What's the problem, anyway? Why did they decide not to do it?

@zonyitoo
Copy link
Collaborator

shadowsocks/shadowsocks-org#28

You may get the answer from this issue.

@iivankin
Copy link
Author

iivankin commented Mar 20, 2022

UDP over TCP expects very poor performance.

Does it always have to be over tcp?

@zonyitoo
Copy link
Collaborator

What do you mean?

@iivankin
Copy link
Author

Why over TCP?

@zonyitoo
Copy link
Collaborator

Ask the question in that issue.

@iivankin
Copy link
Author

This issue is 5 years old and it is closed.

@iivankin
Copy link
Author

There is a SIP003u, but it is just ignored

@zonyitoo
Copy link
Collaborator

You may try to push it forward and standardize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants