goproxy / goproxy

A minimalist Go module proxy handler.

Home Page:https://pkg.go.dev/github.com/goproxy/goproxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

goproxy redirect http proxy to transparent proxy cause some http quest 400 error

aries1998 opened this issue · comments

commented

basic network
v2raya basic proxy mode, socks5 proxy port : 20170 , http proxy port :20171
goroxy command line : ./proxy sps --redir -p :8080 -P socks5://127.0.0.1:20170
iptables redirect the traffic based on dest ip address
ipv4/ipv6 dual stack

goproxy version: free_13.0

400 error request example:
http://ds.v6ns.vm3.test-ipv6.com/ip/?callback=_jqjsp&testdomain=test-ipv6.com&testname=test_v6ns

linux-router->root:~# curl -v "http://ds.v6ns.vm3.test-ipv6.com/ip/?callback=_jqjsp&testdomain=test-ipv6.com&testname=test_v6ns"

  • Trying 2001:470:1:18::115:80...
  • Connected to ds.v6ns.vm3.test-ipv6.com (2001:470:1:18::115) port 80 (#0)

GET /ip/?callback=_jqjsp&testdomain=test-ipv6.com&testname=test_v6ns HTTP/1.1
Host: ds.v6ns.vm3.test-ipv6.com
User-Agent: curl/7.81.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 400 Bad Request
    < Connection: close
    < Proxy-Connection: close
    < Content-Length: 0
    <
  • Closing connection 0

isseue detail:
1 when goproxy redirect http proxy 20171 and using iptable , it get 400 error
2 when goproxy redirect socks5 proxy 20170 and using iptables , it's ok
3 when using the http proxy in broswer instead of using iptables , it's ok

不好意思,你大概找错了项目,这个项目是针对 Go module proxy 的。