Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i/o timeout when some clients connect to the proxy #521

Open
KewaiiGamer opened this issue Jan 22, 2023 · 1 comment
Open

i/o timeout when some clients connect to the proxy #521

KewaiiGamer opened this issue Jan 22, 2023 · 1 comment

Comments

@KewaiiGamer
Copy link

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.

err = fmt.Errorf("http decoder read err:%s", err)

I also noticed the maximum bytes used on conn.Read() is defined as 4096 as seen at
req, err := utils.NewHTTPRequest(&inConn, 4096, s.IsBasicAuth(), &s.basicAuth)

Note: I have the commercial version

@snail007
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants