python-ngrok icon indicating copy to clipboard operation
python-ngrok copied to clipboard

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

Open iLayPark opened this issue 3 years ago • 2 comments

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

iLayPark avatar Apr 22 '21 04:04 iLayPark

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

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

hauntek avatar Apr 24 '21 19:04 hauntek

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

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

hauntek avatar Apr 24 '21 19:04 hauntek