Giter Club home page Giter Club logo

Comments (8)

xqdoo00o avatar xqdoo00o commented on July 18, 2024

socat命令是怎么写的

from chatgpt-web.

2168028160 avatar 2168028160 commented on July 18, 2024

socat配置
socat TCP4-LISTEN:8443,reuseaddr,fork PROXY:proxy.nic.xxx.com:api.openai.com:443,proxyport=8080,proxyauth=user:passwd

尝试在Nginx添加proxy_ssl_server_name on;也无效

location ^~ /v1 {
		proxy_ssl_server_name on;
		proxy_pass https://127.0.0.1:8443;
		proxy_set_header Host api.openai.com;
		proxy_set_header  Authorization "Bearer sk-xxx";
		proxy_pass_header Authorization;
		proxy_buffering off;
	}

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

应该是昨天接口更新tls1.3导致的,socat貌似不支持tls1.3
是接口更新套了个cf导致的,因为socat不支持sni,所以tls握手失败了

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

第二个是对的,如果在国内的话,curl走代理了,就是nginx的proxy_pass 不支持前置代理。

from chatgpt-web.

2168028160 avatar 2168028160 commented on July 18, 2024

大佬有解决方案吗。。。

from chatgpt-web.

2168028160 avatar 2168028160 commented on July 18, 2024

不使用nginx,使用caddy可以实现吗?

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

不使用nginx,使用caddy可以实现吗?

caddy好像可以,不过还没正式发布版本,要等这个PR合并后发的新版本,也就是2.6.5及之后的版本。
也可以用Actions里最新编译的版本。
就支持使用http_proxy和https_proxy环境变量里的代理了
比如

export http_proxy=http://127.0.0.1:10809
export https_proxy=http://127.0.0.1:10809

再运行caddy

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

大佬有解决方案吗。。。

你参考下最新的nginx配置,加两行就好了,socat配置不变

from chatgpt-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.