Comments (4)
Additional observation:
I tried to obtain a log using "verbosity trace"
While it is quite obvious that something is not allright (the log moves extremely fast at first in stdout but then suddenly slows to a crawl) no error is ever displayed (TRAC[2023-08-03T08:08:28+03:00] 135 read from stream 1 with err style messages, they just sort of slow down to a crawl as problem asserts itself)
Restarting cloak client (as I mentioned before) resolves the problem for a bit
EDITED TO ADD
This also happens when using TCP mode, albeit far less frequently
TCP configurations tested:
OpenVPN(TCP)<->Cloak
OpenVPN(TCP)<->shadowsocks-rust<->Cloak
(OpenVPN used to convert UDP traffic to TCP)
At consistently high load the connection would just stall eventually (openVPN losing connection)
TCP connections tend to eventually (seconds to minutes) recover from stall (so yeah, TCP works better) but there's definitely something weird going on here on Cloak's part (during a stall, restarting OpenVPN or shadowsocks does not help, but restarting client does help, suggesting it's same problem as I initially ran into with UDP)
from cloak.
Can consistently reproduce the "TCP variant" of hiccup problem via following procedure:
VM1 (runs browser with youtube video and a terminal with ping constantly trying to ping 8.8.8.8)
|
VM2 (OpenVPN, TCP mode with SOCKS proxy option (TCP) enabled, config is ProtonVPN's free tier TCP server with socks-proxy directive added)
|
VM3 (runs cloak configured to serve TCP connection to the SOCKS proxy)
|
internet
|
VPS, with Cloak server and SOCKS proxy to which TCP connection is delivered via cloak
|
more internet :)
|
ProtonVPN's free VPN (TCP of course)
|
more internet :)
Connection starts great and works reliably for 4-15 minutes
Then ping suddenly stalls for multiple seconds.
Sometimes it self recovers fast
Sometimes it takes a while.
Usually it does not break connection
Nothing in Cloak's log
Nothing in open VPN log (unless connection breaks in which case it does usual TCP openvpn dance)
Evidence it is a Cloak issue and not say, networking:
Replacing Cloak in VM3 with Dante in chaining config completely resolves the situation, no more hiccups.
When running Dante and Cloak in VM3 in parallel (on different ports) just switching between two OpenVPN configs (exactly same, but one points to Dante's port on VM3 the other to Cloak's port) allows to immediately switch between "hiccups present" and "no hiccups"
EDIT: I will continue running this VM periodically from the "lab" (rich term for my rickety setup) and see how it goes in terms of "TCP hiccuping" , will also set up a roughly similar VM testbed for UDP but it's a bit trickier to get good comparator there, UDP support in SOCKS kinda sux)
EDIT:
So running those two (the "through TCP cloak" and "raw TCP socks" chain) on same uplink (good country, no filtering/blocking)
I'm finding that
- actually the hiccups with Cloak are very intermittent and "luck based" so maybe something external (network conditions?) is triggering them
- never happen on SOCKS-TCP variant so it's not entirely reducible to network problems
- playing around with number of connections (and for some reason StreamTimeout though this may be placebo :) ) seems to have some effect, I've found that on my particular connection 5 is the happy connection number (Cloak TCP almost never "hiccups") while 3,4, and 6 all have inferior performance.
from cloak.
Cloak tunnels udp packets inside tcp and since it's now tcp there is no more udp packet loss, so protocols that depend on sensing udp packet loss to optimize their rate get confused. Also it's affected by the same issue you described for tcp as well.
from cloak.
Hm, I think it has something to do with how Cloak handles its "outer layer" TCP connection (possibly some small intermittent issue in connectivity which is unavoidable at some point triggers it to manifest) and UDP just gets hit harder due to being encapsulated inside affected TCP (so you get "two problems" instead of one in some weird way)
from cloak.
Related Issues (20)
- Cloak + OpenVpn HOT 1
- [affirmation request] if the `RedirAddr` is a domain, there is no need to append port to it?
- eats up all the memory and the server hangs HOT 1
- Cloak behind Caddy reverse-proxy is unreachable with Android app. HOT 1
- ck-client-windows-amd64-v2.6.1.exe 被报毒 HOT 1
- Reverse proxy and websocket HOT 2
- Question about EncryptionMethod for wireguard traffic HOT 4
- update browser signature
- Error: stuck at attemping to start a session HOT 1
- (可能是白痴问题)Cloak可以直接使用Xray-Core的uTLS指纹库吗?
- WARP Cloudflare to Cloak Config HOT 1
- Please allow having both TCP and UDP in same instance / same proxybook HOT 2
- The Amazon instruction is not working out for me (probably some Mystery Setting in the distribution) HOT 7
- feature suggestions (2): more aggressive connection checking when there's activity on listening port + minor unrelated DNS stuff
- Anomalous behavior of TCP cloak (also UDP but less important) when using Android Hotspot, unlikely to be TTL / operator filtering HOT 32
- A spontaneous problem with Cloak-TCP (caught a crash log this time) HOT 5
- Voice call not working HOT 1
- ck-client hangs on wake from suspend
- RedirAddr behaves quite odd when BindAddr is changed to "non-default" ports ...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloak.