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

http代理请求头貌似不能带上host #23

Open
iLayPark opened this issue Apr 22, 2021 · 2 comments
Open

http代理请求头貌似不能带上host #23

iLayPark opened this issue Apr 22, 2021 · 2 comments

Comments

@iLayPark
Copy link

iLayPark commented Apr 22, 2021

无法把要代理的访问域名传过去

@hauntek
Copy link
Owner

hauntek commented Apr 24, 2021

        if type == 3 or (type == 2 and linkstate == 2):
            sendbuf(tosock, recvbuf)
            recvbuf = bytes()

代理的数据都是直接转发的

@hauntek
Copy link
Owner

hauntek commented Apr 24, 2021

因为 connectlocal 会对域名进行解析成ip,后建立隧道。
例如: 反向代理nginx绑定了server_name,需要在nginx配置里加入 server_name ip或者是ngrok服务器域名;

设置自定义域名的话:需要在nginx配置里加入 server_name 自定义域名;
设置服务器随机域名的话:需要在nginx配置里加入 服务器指派的域名; 或者端口

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

1 participant