[GH-ISSUE #521] i/o timeout when some clients connect to the proxy #422

Open
opened 2026-02-27 23:16:51 +03:00 by kerem · 1 comment
Owner

Originally created by @KewaiiGamer on GitHub (Jan 22, 2023).
Original GitHub issue: https://github.com/snail007/goproxy/issues/521

Expected Behavior

Client should be able to connect to proxy

Current Behavior

goproxy is giving i/o timeout when some clients try to connect.

Steps to Reproduce

  1. Setup goproxy with the following command
  2. proxy http -t tcp -p :8000 --auth-nouser --auth-url http://127.0.0.1:3000/auth
  3. Connect to proxy via client
  4. Proxy will give i/o on some clients. Not all however

Context (Environment)

  1. proxy version is : commercial_12.5
  2. full command is proxy http -t tcp -p :8000 --auth-nouser --auth-url http://127.0.0.1:3000/auth
  3. system is : ubuntu 20.04
  4. error example in log: 2023/01/22 00:38:52.883349 WARN decoder error , from 33.5.2.76:50727, ERR:http decoder read err: http decoder read err: read tcp 192.168.0.5:8000->33.5.2.76:50727: i/o timeout

Detailed Description

As I have discussed on telegram not all customers have this issue. Dev already said it is issue with client not sending correct http header.

Possible Implementation

This is the line of code on free version where the eror happens. github.com/snail007/goproxy@f7b3a76582/utils/structs.go (L249)
I also noticed the maximum bytes used on conn.Read() is defined as 4096 as seen at github.com/snail007/goproxy@03670bfad1/services/http.go (L72)
Note: I have the commercial version

Originally created by @KewaiiGamer on GitHub (Jan 22, 2023). Original GitHub issue: https://github.com/snail007/goproxy/issues/521 ## Expected Behavior Client should be able to connect to proxy ## Current Behavior goproxy is giving i/o timeout when some clients try to connect. ## Steps to Reproduce 1. Setup goproxy with the following command 2. proxy http -t tcp -p :8000 --auth-nouser --auth-url http://127.0.0.1:3000/auth 3. Connect to proxy via client 4. Proxy will give i/o on some clients. Not all however ## Context (Environment) 1. proxy version is : commercial_12.5 2. full command is proxy http -t tcp -p :8000 --auth-nouser --auth-url http://127.0.0.1:3000/auth 3. system is : ubuntu 20.04 4. error example in log: 2023/01/22 00:38:52.883349 WARN decoder error , from 33.5.2.76:50727, ERR:http decoder read err: http decoder read err: read tcp 192.168.0.5:8000->33.5.2.76:50727: i/o timeout ## Detailed Description As I have discussed on telegram not all customers have this issue. Dev already said it is issue with client not sending correct http header. ## Possible Implementation This is the line of code on free version where the eror happens. https://github.com/snail007/goproxy/blob/f7b3a7658236a99f7a6e7d2b57136338ddcb944d/utils/structs.go#L249 I also noticed the maximum bytes used on conn.Read() is defined as 4096 as seen at https://github.com/snail007/goproxy/blob/03670bfad1fd6923c05dbc635fb07699d7cea447/services/http.go#L72 Note: I have the commercial version
Author
Owner

@snail007 commented on GitHub (Jan 22, 2023):

try increase read buffer, --http-header-buffer=8192 or greater

<!-- gh-comment-id:1399464419 --> @snail007 commented on GitHub (Jan 22, 2023): try increase read buffer, `--http-header-buffer=8192` or greater
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#422
No description provided.