EtherDream / jsproxy

An online proxy based on ServiceWorker
MIT License
9.33k stars 3.6k forks source link

部署没有问题,但是在GCP上提示提示RangeError #37

Closed goxofy closed 5 years ago

goxofy commented 5 years ago

同样的方式在阿里云轻应用服务器和GCP上分别部署了服务端,轻应用服务器没有问题,但是GCP节点报错如下: RangeError: Status must be between 200 and 599

EtherDream commented 5 years ago

浏览器控制台 network 里请求返回的状态码(包括 --s 返回头)是什么?

goxofy commented 5 years ago

500, 我看了一下logs/error.log, 显示的是 lua/http-dec-req-hdr.lua, 这个文件加载失败,然后我对比了轻量云和gcp上面这两个文件,似乎和最近一次commit有关,轻量云搭建的早一些

EtherDream commented 5 years ago

是的,前几天提交错了。。。。你再更新下

goxofy commented 5 years ago

@EtherDream 运行报错

jsproxy@instance-1:~/server$ ./run.sh
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
        no field package.preload['resty.core']
        no file './lua/resty/core.lua'
        no file '/home/jsproxy/openresty/site/lualib/resty/core.so'
        no file '/home/jsproxy/openresty/lualib/resty/core.so'
        no file './resty/core.so'
        no file '/usr/local/lib/lua/5.1/resty/core.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/jsproxy/openresty/site/lualib/resty.so'
        no file '/home/jsproxy/openresty/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')
EtherDream commented 5 years ago

@EtherDream 运行报错

jsproxy@instance-1:~/server$ ./run.sh
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
        no field package.preload['resty.core']
        no file './lua/resty/core.lua'
        no file '/home/jsproxy/openresty/site/lualib/resty/core.so'
        no file '/home/jsproxy/openresty/lualib/resty/core.so'
        no file './resty/core.so'
        no file '/usr/local/lib/lua/5.1/resty/core.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/jsproxy/openresty/site/lualib/resty.so'
        no file '/home/jsproxy/openresty/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')

找了台新机器还真有这错误。。。你再更新下试试

goxofy commented 5 years ago

@EtherDream 运行报错

jsproxy@instance-1:~/server$ ./run.sh
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
        no field package.preload['resty.core']
        no file './lua/resty/core.lua'
        no file '/home/jsproxy/openresty/site/lualib/resty/core.so'
        no file '/home/jsproxy/openresty/lualib/resty/core.so'
        no file './resty/core.so'
        no file '/usr/local/lib/lua/5.1/resty/core.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/jsproxy/openresty/site/lualib/resty.so'
        no file '/home/jsproxy/openresty/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')

找了台新机器还真有这错误。。。你再更新下试试

搞定,这个resty是干啥的?

goxofy commented 5 years ago

@EtherDream 运行报错

jsproxy@instance-1:~/server$ ./run.sh
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
        no field package.preload['resty.core']
        no file './lua/resty/core.lua'
        no file '/home/jsproxy/openresty/site/lualib/resty/core.so'
        no file '/home/jsproxy/openresty/lualib/resty/core.so'
        no file './resty/core.so'
        no file '/usr/local/lib/lua/5.1/resty/core.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/jsproxy/openresty/site/lualib/resty.so'
        no file '/home/jsproxy/openresty/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/home/jsproxy/openresty/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')

找了台新机器还真有这错误。。。你再更新下试试

ps:iOS safari上貌似youtube不能播放..

EtherDream commented 5 years ago

是一直加载中,还是背景是雪花

goxofy commented 5 years ago

是一直加载中,还是背景是雪花

雪花,出了点问题,请稍候重试

EtherDream commented 5 years ago

是一直加载中,还是背景是雪花

雪花,出了点问题,请稍候重试

只有 iOS safari 才看不了吗,还是所有浏览器都是

goxofy commented 5 years ago

@EtherDream 其他浏览器可以,就最新版的iOS safari无法看youtube,但是打开其他网页没问题 ,twitch还有twitter timeline里的视频都可以看,唯独youtube不行

goxofy commented 5 years ago

@EtherDream 大佬有方案解决否?

EtherDream commented 5 years ago

@EtherDream 大佬有方案解决否?

我还在调试~

goxofy commented 5 years ago

@EtherDream 大佬,新加的这个cfworker如何配置呢?需要单独购买cf的服务?

EtherDream commented 5 years ago

@EtherDream 大佬,新加的这个cfworker如何配置呢?需要单独购买cf的服务?

每月 5 美元,有 1000 万次代理。这里可以免费试用:https://cloudflareworkers.com/#12a9195720fe4ed660949efdbd9c0219:https://www.google.com/

goxofy commented 5 years ago

这个购买了之后如何配置到本项目里呢,有木有相关的文档

EtherDream commented 5 years ago

这个购买了之后如何配置到本项目里呢,有木有相关的文档

文档还没写。目前 conf.js 里已经有我那个 cfworker 节点了(暂时没限制 referer 大家都可以用),不过服务端默认没有开启节点切换的功能。把 lua/http-enc-res-hdr.lua 文件 114-116 行注释打开就可以。

goxofy commented 5 years ago

@EtherDream 明白了,感谢