Cloak
Cloak copied to clipboard
[Question] How to use shadowsocks udp with cloak 2.1.1
Hello, i need help with this because im using shadowsocks with cloak and when i try to use udp it doesnt work on android, here is my shadowsocks libev config:
"server":"127.0.0.1", "server_port":56781, "password":"*********", "timeout":60, "method":"chacha20-ietf-poly1305", "nameserver":"8.8.8.8", "mode":"tcp_and_udp"
My cloak config is this:
{ "ProxyBook": { "shadowsocks":["udp","127.0.0.1:56781"] , "panel":["tcp","127.0.0.1:0"] }, "BypassUID": [ "**", "**" ], "BindAddr":[":443"], "RedirAddr": "204.79.197.200", "PrivateKey": "**", "AdminUID": "**", "DatabasePath": "userinfo.db", "StreamTimeout": 300 }
Note: All * means that i replace them to post here but original values are on the vps
I think not gonna work. Proxy book for shadowsocks must be tcp.
Or try force run shadowsocks only in udp `-U' case sensitive
https://github.com/shadowsocks/shadowsocks-org/issues/28 I think Shadowsocks doesn't support udp for its plugins.
b. Only TCP traffic is forwarded. For now, there is no plan to support UDP traffic forwarding.
What about let UDP bypass for now? UDP over TCP expects very poor performance.
I am using proxy book openvpn with udp its greats, I know speed won't be good compared to shadowsocks, but I can use it for game and etc
If you use a plugin in Shadowsocks, The UDP will not be working.
Restrictions a. Plugin over plugin is NOT supported. Only one plugin can be enabled when a shadowsocks service is started. If you really need this feature, implement a plugin-over-plugin transport as a SIP003 plugin. b. Only TCP traffic is forwarded. For now, there is no plan to support UDP traffic forwarding.
via: https://shadowsocks.org/en/spec/Plugin.html
WireGuard seems like a nice alternative to OpenVPN in terms of gaming, is it able to pair with Cloak too?
@klaaktu A while ago I have actually experimented pairing WireGuard with Cloak. Theoretically Cloak should work with anything that lets you tunnel UDP traffic, but I'm not familiar with WireGuard so unfortunately I couldn't find a way to configure WireGuard that works.
@cbeuw i will try this one, i hope speed are good like original speed wireguard itself
Wait... can u tunnel UDP traffic from Shadowsocks if you run Cloak in standalone mode? Is there a way to test this?
Edit: nope... same error as WireGuard when tested in Sockscap64.
Edit2:
Change to "NumConn": 1 and no more ck-client error when tunneling Shadowsocks UDP.
It's the same for WireGuard and OpenVPN, now they connect without problem (I can open websites).
However Shadowsocks' server side gives this error:
ERROR: failed to handshake with ::1: authentication error
ERROR: failed to handshake with 127.0.0.1: authentication error
WireGuard client gives this error, if endpoint is localhost instead (with "kill-switch" disabled):
Failed to send data packet write udp4 0.0.0.0:53457->127.0.0.1:1984: wsasendto: The requested address is not valid in its context.
cloak with standalone mode
you can use ss with cloak[tcp] or only ss[tcp&udp]
Sry I might have forgotten to change Shadowsocks ProxyBook entry to UDP or restart ck-server after editing, the error message hinted at it since handshake is for TCP. Anyway it seems UDP does work with Shadowsocks!
Testing UDP Associate...
Proxy server bound on 127.0.0.1:1080 for udp relay.
Testing data transmission...
The UDP transmission testing was successful.
What I did:
Shadowsocks client settings, change to 127.0.0.1:1984 no plugin.
ck-client, add -u parameter, and change NumConn to 1 in config file (#96).
ck-server config, ProxyBook shadowsocks entry, change 'tcp' to 'udp'. Restart ck-server.
For TCP+UDP I think I need: 2 ck-client, 2 config files with different ProxyMethod names. One listens to tcp the other udp (same port number). ck-server 2 ProxyBook entries as well. One "tcp" one "udp".