Connection closes when trying to download files
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 33/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- networking
Direzione di ricerca
The reproduction (socks inbound -> shadowsocks outbound with v2ray-plugin) and the log line connection: connection download closed: short buffer are the two anchors: grep the connection package for that message to find where the copy loop aborts, then follow the shadowsocks outbound read path. Rebuild sing-box with the supplied client config, run the curl command against 127.0.0.1:1080, and confirm the download completes without the short-buffer error. Expect to need familiarity with the transport layer before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Operating system
Linux
System version
arch linux
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
sing-box version 1.14.4
Environment: go1.27.3-X:nodwarf5 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,with_ccm,with_ocm,with_cloudflared,with_naive_outbound,with_usbip,with_openvpn,with_openconnect,badlinkname,tfogo_checklinkname0
CGO: enabled
Description
My Android phone is connected to a remote server over shadowsocks with the v2ray plugin, the inbound connection is configured to use socks5. When trying to download various files from the internet the downloading constantly fails. I was also able to reproduce this on arch.
Reproduction
arch amd64 ( 2 services 1 pc )
Server side
Retrieving the plugin:
wget https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.5.0/v2ray-plugin-linux-amd64-v1.5.0.tar.gz
tar -xzf v2ray-plugin-linux-amd64-v1.5.0.tar.gz
Installing ss:
sudo pacman -S shadowsocks-rust
Creating a file named config.json with the following content:
{
"server": "127.0.0.67",
"mode": "tcp_and_udp",
"server_port": 80,
"password": "qwerty",
"method": "chacha20-ietf-poly1305",
"plugin": "/home/arch2/v2ray-plugin_linux_amd64", // change to point to the plugin
"plugin_opts": "server"
}
Starting the first service:
sudo ssserver --config config.json
Sing box service
Installing sing box:
sudo pacman -S sing-box
Creating a file named client.conf with the following content:
{
"inbounds": [
{
"type": "socks",
"tag": "socks",
"listen": "127.0.0.1",
"listen_port": 1080
}
],
"outbounds": [
{
"type": "shadowsocks",
"tag": "ss",
"server": "127.0.0.67",
"server_port": 80,
"method": "chacha20-ietf-poly1305",
"password": "qwerty",
"plugin": "v2ray-plugin",
"plugin_opts": ""
}
]
}
Starting proxy:
sudo sing-box run -c client.json
The output when trying to download the latest and greatest Firefox Nightly Release
curl -x socks5h://localhost:1080 --output file https://ftp.mozilla.org/pub/fenix/nightly/2026/11/2026-11-15-09-26-57-fenix-162.0a1-android-arm64-v8a/fenix-162.0a1.multi.android-arm64-v8a.apk
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 0
curl: (56) OpenSSL SSL_read: OpenSSL/4.1.0: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Logs
INFO[0000] inbound/socks[socks]: tcp server started at 127.0.0.1:1080
INFO[0000] network: updated default interface enp1s0, index 2
INFO[0000] network: updated network environment: gateway 192.168.122.1, gateway_mac **:**:**:**:**:**
INFO[0000] sing-box started (0.00s)
INFO[0176] [3910467518 0ms] inbound/socks[socks]: inbound connection from 127.0.0.1:37882
INFO[0176] [3910467518 0ms] inbound/socks[socks]: inbound connection to ftp.mozilla.org:443
INFO[0176] [3910467518 0ms] outbound/shadowsocks[ss]: outbound connection to ftp.mozilla.org:443
TRACE[0176] [3910467518 282ms] connection: connection upload closed
ERROR[0176] [3910467518 283ms] connection: connection download closed: short buffer
Supporter
- I am a sponsor
Integrity requirements
- I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
- Lingua principale
- Go
- Stelle
- 40.4k
- Fork
- 5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SagerNet/sing-box
-
`check` and startup are quadratic in outbound group size since 1.14.4 (duplicate tag check)Forse già presa @Tidehyc l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
database file removal errorsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
Tutte le issue di SagerNet/sing-box
Issue simili
-
good first issue tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Edwin-metcalf/MetCode#76 ·
I maintainer di solito rispondono entro 1 giorno
-
-diff's removed-name budget ignores the names the -ptr pass testedForse già presa @nova-loop l’ha presa oggi. Apertaarea: cli bug good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TMHSDigital/subenum#495 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:s impact:med raised-by:worker risk:low to:worker
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
medici-finance/assay#8120 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
reportedBy/community
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openchoreo/openchoreo#5751 ·
I maintainer di solito rispondono entro 1 giorno