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

403错误 #89

Open
gfyuye opened this issue Oct 30, 2024 · 21 comments
Open

403错误 #89

gfyuye opened this issue Oct 30, 2024 · 21 comments

Comments

@gfyuye
Copy link

gfyuye commented Oct 30, 2024

下午大约2点的时候,部署在docker中的服务器突然不能使用了。
{"message":"服务器多次尝试后转换失败","errors":["连接失败: Error: Unexpected server response: 403","连接失败: Error: Unexpected server response: 403","连接失败: Error: Unexpected server response: 403"]}。
但是去年部署在vercel上的服务器,用梯子登上去试了下,可以正常使用

@xinghusp
Copy link

+1,我也是一样的问题
image

@xinghusp
Copy link

测试了一下,如@gfyuye 所说,本地Docker中只要爬梯子就能正常了,可能是EDGE接口屏蔽了中国大陆的IP?

@mioshare
Copy link

mioshare commented Oct 31, 2024

直接在应用里面调用微软,移动,电信也不行。腾讯服务器搭建服务也不行,最后转了甲骨文新加坡节点就可以。还找了一下大模型的文字转语音,这个有人在研究吗,稳定性和速度咋样

@gfyuye
Copy link
Author

gfyuye commented Oct 31, 2024

我的甲骨文只用了一个月就被永封了,只开了个tts。现在还没法重新注册。

@holzora
Copy link

holzora commented Oct 31, 2024

看了前面搭香港服务器上就好了,大声朗读被大陆ip薅哭了吗😂

@gfyuye
Copy link
Author

gfyuye commented Oct 31, 2024

难说,edge浏览器自带的就可以用。

@xinghusp
Copy link

xinghusp commented Nov 2, 2024

确实最新版的EDGE浏览器能正常用 应该是加了什么检测

@jxiansen
Copy link

jxiansen commented Nov 2, 2024

image
我也403了,以为是我自己的问题,果然大家都的,小说没法听真不习惯

@gfyuye
Copy link
Author

gfyuye commented Nov 2, 2024

暂时用vercel+cloudflare吧。

@wxxxcxx
Copy link
Owner

wxxxcxx commented Nov 4, 2024

好像是屏蔽了国内的服务,后续我再研究下

@gfyuye
Copy link
Author

gfyuye commented Nov 4, 2024

我之前尝试用cloudflare的page部署,能部署成功,没有报警,但是打不开页面。

@gfyuye
Copy link
Author

gfyuye commented Nov 4, 2024

2024-11-04T04:15:01.59928Z Cloning repository...
2024-11-04T04:15:02.228869Z From https://github.com/XX/tts
2024-11-04T04:15:02.229417Z * branch 093**************b -> FETCH_HEAD
2024-11-04T04:15:02.229604Z
2024-11-04T04:15:02.258092Z HEAD is now at 0
7 Update README.md
2024-11-04T04:15:02.258678Z
2024-11-04T04:15:02.354682Z
2024-11-04T04:15:02.355251Z Using v2 root directory strategy
2024-11-04T04:15:02.382091Z Success: Finished cloning repository files
2024-11-04T04:15:05.666371Z Checking for configuration in a wrangler.toml configuration file (BETA)
2024-11-04T04:15:05.667152Z
2024-11-04T04:15:05.766649Z No wrangler.toml file found. Continuing.
2024-11-04T04:15:05.850039Z No build command specified. Skipping build step.
2024-11-04T04:15:05.850925Z Note: No functions dir at /functions found. Skipping.
2024-11-04T04:15:05.851061Z Validating asset output directory
2024-11-04T04:15:07.871742Z Deploying your site to Cloudflare's global network...
2024-11-04T04:15:10.456371Z Uploading... (0/18)
2024-11-04T04:15:10.990053Z Uploading... (6/18)
2024-11-04T04:15:11.281265Z Uploading... (12/18)
2024-11-04T04:15:11.401472Z Uploading... (18/18)
2024-11-04T04:15:11.401846Z ✨ Success! Uploaded 18 files (1.72 sec)
2024-11-04T04:15:11.401961Z
2024-11-04T04:15:11.591961Z ✨ Upload complete!
2024-11-04T04:15:13.495493Z Success: Assets published!
2024-11-04T04:15:14.754648Z Success: Your site was deployed!

也没什么报警,就是打不开。

@yangzf01
Copy link

好像是屏蔽了国内的服务,后续我再研究下

好像是和一个参数有关:Sec-MS-GEC=9AFE23F9D1E86CD481187CDF6B2157B78C4D550D46DFA2BDF86D4A5F27CA3E32
会等于这种格式的字符串,就是不知道是怎么生成的。用随机字符串的话,也会403,如果抓包的话,也只能用1分钟左右。

看到一个可能有关的请求:
https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&Sec-MS-GEC=9AFE23F9D1E86CD481187CDF6B2157B78C4D550D46DFA2BDF86D4A5F27CA3E32&Sec-MS-GEC-Version=1-118.0.2088.69&ConnectionId=6915db4f9c2aabc00bb025e2941c7462

但是访问会是404,没思路了,研究不下去了。

@tttsss-01
Copy link

docker的环境变量设置了http_proxy和HTTP_PROXY ,还是没效果,这个怎么搞,有懂的吗

@wxxxcxx
Copy link
Owner

wxxxcxx commented Nov 14, 2024

docker的环境变量设置了http_proxy和HTTP_PROXY ,还是没效果,这个怎么搞,有懂的吗

同时设置了https_proxy吗?

@xiekai-mc
Copy link

docker的环境变量设置了http_proxy和HTTP_PROXY ,还是没效果,这个怎么搞,有懂的吗

同时设置了https_proxy吗?

也设置了

@youngcube
Copy link

#91
based on: rany2/edge-tts#290 (comment)

@jxiansen
Copy link

https://juejin.cn/post/7434720479976669218
主要原因是微软针对国内的服务增加了限制和验证,掘金已经有了文章。我自己是将服务从aliyun迁移到国外的vps就生效了

@smilingpoplar
Copy link

有人知道该怎么加代理吗?我试过:

  • docker加HTTP_PROXY和HTTPS_PROXY环境变量
  • service/edge/index.ts里加https-proxy-agent

没试成功,很奇怪。

将主机的网关和dns指向旁路由倒是可以

@yangzf01
Copy link

yangzf01 commented Dec 2, 2024

有人知道该怎么加代理吗?我试过:

  • docker加HTTP_PROXY和HTTPS_PROXY环境变量
  • service/edge/index.ts里加https-proxy-agent

没试成功,很奇怪。

将主机的网关和dns指向旁路由倒是可以
image

socket连接的时候,没判断代理吧。所以是不管怎么设置代理参数都没用,需要用http代理的话,得改下代码
image
(问chatGPT得出的结果,不一定准确)

@smilingpoplar
Copy link

socket连接的时候,没判断代理吧。所以是不管怎么设置代理参数都没用,需要用http代理的话,得改下代码

我就这么改的,竟然没成功。你这么改若可行的话,说声哈。

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