一文教你如何反代oaifree voice


只是快速闪了一下就跳到new.oaifree.com了,而且不是跳到我反代new.oaifree.com的oai.abc.com

厉害

前排

1 Like

这么看还是nginx明了

大佬,请问下为啥我反代的voice网站无法处理callback,但是始皇的网站可以处理,用的代码是上面始皇给的

1 Like

太牛了已经用上了

1 Like

按这个反代规则填入nginx

    # token.xxxxx.com -> 网站反代
    server {
        listen 443 ssl;
        listen [::]:443 ssl;
        http2 on;
        server_name token.xxxx.com;

        # CORS 头部设置
        add_header 'Access-Control-Allow-Origin' '*' always;
        add_header 'Access-Control-Allow-Methods' 'GET, HEAD, POST, OPTIONS' always;
        add_header 'Access-Control-Allow-Headers' '*' always;

        location / {
            proxy_http_version 1.1;
            proxy_pass https://sharetoken.xxxx.workers.dev;
            proxy_set_header Connection "upgrade";
            # proxy_set_header Host "sharetoken.xxxx.workers.dev";
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_buffering off;
            proxy_ssl_server_name on; # 传递 SNI 信息
            proxy_cache off;
            send_timeout 600;
            proxy_connect_timeout 600;
            proxy_send_timeout 600;
            proxy_read_timeout 600;
            proxy_set_header Authorization "Basic dXNlcmsssw5hzc3dvcmQ="; # 使用Base64编码凭证
        }
    }

实际运行curl -i -H “Authorization: Basic dXNlcm5hbssssszc3dvcmQ=” https://sharetoken.xxxx.workers.dev出现
HTTP/2 401
date: Sun, 09 Jun 2024 12:37:42 GMT
content-type: text/html; charset=utf-8
content-length: 2172

然后https://token.xxxx.com无法打开,用https://sharetoken.xxxx.workers.dev是可以打开网站的

所以什么时候重新支持视频?

电脑上试了chrome 浏览器可以,手机上不行报错如下

Application error: a client-side exception has occurred (see the browser console for more information).

干得漂亮 :rofl:

怎一个6字了得

牛哇 :grin:

后排

cf反代,电脑访问正常,ios自带浏览器访问域名会跳转到反代的域名

特地声明,我是第200赞

生动活泼