Tethering via RNDIS not working / Timeout
Hello,
my device (Xiaomi POCO 22041219PG / HyperOS 1.0.5.0.ULSEUXM) configured for USB tethering - the proxy is not working.
CURL console log
➜ ~ curl https://proof.ovh.net/files/10Mb.dat --proxy http://192.168.113.37:8228 --output /dev/null --verbose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.168.113.37:8228...
* CONNECT tunnel: HTTP/1.1 negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to proof.ovh.net:443
> CONNECT proof.ovh.net:443 HTTP/1.1
> Host: proof.ovh.net:443
> User-Agent: curl/8.11.1
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection Established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: curl offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [112 bytes data]
0 0 0 0 0 0 0 0 --:--:-- 0:04:59 --:--:-- 0* Connection timed out after 300335 milliseconds
0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0
* closing connection #0
curl: (28) Connection timed out after 300335 milliseconds
➜ ~ curl https://proof.ovh.net/files/10Mb.dat --proxy https://192.168.113.37:8228 --output /dev/null --verbose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.168.113.37:8228...
* ALPN: curl offers http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
{ [5 bytes data]
* TLSv1.3 (OUT), TLS alert, record overflow (534):
} [2 bytes data]
* TLS connect error: error:0A0000C6:SSL routines::packet length too long
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* closing connection #0
curl: (35) TLS connect error: error:0A0000C6:SSL routines::packet length too long
➜ ~ curl https://proof.ovh.net/files/10Mb.dat --proxy socks5h://192.168.113.37:8228 --output /dev/null --verbose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.168.113.37:8228...
0 0 0 0 0 0 0 0 --:--:-- 0:04:59 --:--:-- 0* Connection timed out after 300306 milliseconds
0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0
* closing connection #0
curl: (28) Connection timed out after 300306 milliseconds
The clients are properly reported in the interface. I'm attaching the log_20250110140500.log (only the curl log in HTTP proxy).
On wifi direct, all work fine.
Do you have any idea where to start the search/investigation ?
Hi, are you using a Dev build or is this a release build? Does curling for example.com work?
The USB tethering code is trickier since it's basically supported on a best-effort basis as there are no official APIs that I can use like I was able to with WiFi direct.
hello,
Thank you for your interest in this issue.
I am using version 51 found in the releases tab. (for fdroid?) (https://github.com/pyamsoft/tetherfi/releases/download/51/tetherfi-fdroid.apk)
examgle.com works, hmm. But, it remains frozen after a few octets until i timeout(^C). I'm providing the log (to see it, I removed the /dev/null)
➜ /tmp time curl http://example.com --proxy http://192.168.47.131:8228 --verbose
* Trying 192.168.47.131:8228...
* Connected to 192.168.47.131 (192.168.47.131) port 8228
* using HTTP/1.x
> GET http://example.com/ HTTP/1.1
> Host: example.com
> User-Agent: curl/8.11.1
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Request completely sent off
< HTTP/1.1 200 OK
< Age: 400702
< Cache-Control: max-age=604800
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 14 Jan 2025 10:01:42 GMT
< Etag: "3147526947+ident"
< Expires: Tue, 21 Jan 2025 10:01:42 GMT
< Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
< Server: ECAcc (dcd/7D50)
< Vary: Accept-Encoding
< X-Cache: HIT
< Content-Length: 1256
<
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
background-color: #f0f0f2;
margin: 0;
padding: 0;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div {
width: 600px;
margin: 5em auto;
padding: 2em;
background-color: #fdfdff;
border-radius: 0.5em;
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
}
a:link, a:visited {
color: #38488f;
text-decoration: none;
}
@media (max-width: 700px) {
div {
margin: 0 auto;
width: auto;
}
}
</style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
^C
curl http://example.com --proxy http://192.168.47.131:8228 --verbose 0,01s user 0,00s system 0% cpu 5:04,79 total
So just to make sure I understand
curl for example.com works perfectly fine over Wi-Fi direct
curl for example.com "works but then stops working" for USB tethering?
yes, one « packet » and freeze, in Tethering mode
Weird, once the proxy starts up, generally speaking there should not be a difference between one method or the other.
That being said USB tethering support is currently less fleshed out being that it is so new.
I will keep an eye on this. In the meanwhile, I hope its fine on your end using WiFi direct.