Git Product home page Git Product logo

biliroaming-go-server's Introduction

Hi there 👋 I'm Jason Khew a.k.a. Js0n

If you like my project, you can buy me a coffee at ko-fi

biliroaming-go-server's People

Contributors

dependabot[bot] avatar jasonkhew96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

biliroaming-go-server's Issues

白名单模式如何配置

想弄个几个朋友用用的自建。
服务器已搭好。就是配置配置白名单的时候一直没生效。

我自建了个黑白名单API,类似下面
https://xxx.xyz/uuu.php?uid=%d

白名单用户返回如下:
{"code":0,"message":"","data":{"uid":000000,"is_blacklist":false,"is_whitelist":true,"status":0,"ban_until":0}}

其他用户返回如下:
{"code":0,"message":"","data":{"uid":111111,"is_blacklist":true,"is_whitelist":false,"status":1,"ban_until":3378165257}}

config.yml配置如下:

# 黑名单接口
blacklistApiUrl: https://xxx.xyz/uuu.php?uid=%d
# 黑白名单模式
# 0 - 禁用
# 1 - 黑白名单
# 2 - 白名单
blockType: 1

blockType 我试过1和2好像都不行。
blockType 配置成2的时候。返回的status为2。但是失败了。

Makefile

没有Makefile哪里来的二进制文件./biliroaming-go-server

直接运行go run main.go报错

# command-line-arguments ./main.go:40:17: undefined: Config ./main.go:41:27: undefined: visitor ./main.go:78:52: undefined: userStatus ./main.go:147:23: undefined: Config ./main.go:161:24: undefined: Config ./main.go:178:6: b.handleWebPlayURL undefined (type *BiliroamingGo has no field or method handleWebPlayURL) ./main.go:180:6: b.handleWebSearch undefined (type *BiliroamingGo has no field or method handleWebSearch) ./main.go:182:6: b.handleAndroidSearch undefined (type *BiliroamingGo has no field or method handleAndroidSearch) ./main.go:184:6: b.handleAndroidPlayURL undefined (type *BiliroamingGo has no field or method handleAndroidPlayURL) ./main.go:186:6: b.handleBstarAndroidSearch undefined (type *BiliroamingGo has no field or method handleBstarAndroidSearch) ./main.go:186:6: too many errors

反代域名添加默认选项

因为有很多人油猴插件只会填上面那个不带地区参数的默认解析服务器,像我这种只用反代域名的天天被私信轰炸

台区搜索失败(invalid)

核心原因估计是这个

7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.788+0800        ERROR        bili/main.go:289        expected content-type json but text/html; charset=UTF-8

返回值是一个简单的html, 内容是"Fatal: API error", 不知道是否为Bilibili维护API所致. 暂且提出issue观察.
另: 台区解析是正常的, 港区搜索/解析均正常, 应该不是服务器ip被拉入黑名单

详细DEBUG日志如下

7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.098+0800        DEBUG        bili/utils.go:395        Request args access_key=***&appkey=***&area=tw&build=6400000&c_locale=zh-Hans_CN&channel=master&device=android&disable_rcmd=0&fnval=464&fnver=0&fourk=1&highlight=1&keyword=%E8%BE%89%E5%A4%9C&mobi_app=android&platform=android&pn=1&ps=20&qn=116&s_locale=zh-Hans_CN&statistics=%7B%22appId%22%3A1%2C%22platform%22%3A3%2C%22version%22%3A%226.74.0%22%2C%22abtest%22%3A%22%22%7D&ts=1657617963&type=7&sign=***
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.098+0800        DEBUG        bili/utils.go:396        Parsed request args: &{*** tw 0 0 0 辉夜 1 0 116 7 464 *** 1657617963 ***}
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.098+0800        DEBUG        bili/search.go:129        New url: https://api.bilibili.com/x/v2/search/type?access_key=***&appkey=***&area=tw&build=6400000&highlight=1&keyword=%E8%BE%89%E5%A4%9C&mobi_app=android&platform=android&pn=1&sign=***&ts=1657617964&type=7
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.098+0800        DEBUG        bili/httpClient.go:251        doRequest: https://api.bilibili.com/x/v2/search/type?access_key=***&appkey=***&area=tw&build=6400000&highlight=1&keyword=%E8%BE%89%E5%A4%9C&mobi_app=android&platform=android&pn=1&sign=***&ts=1657617964&type=7
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.612+0800        DEBUG        bili/httpClient.go:261        doRedirects: 200
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.612+0800        ERROR        bili/httpClient.go:238        doRequestJsonWithRetry: expected content-type json but text/html; charset=UTF-8
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).doRequestJsonWithRetry
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/httpClient.go:238
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).handleAndroidSearch
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/search.go:131
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.initHttpServer.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/main.go:182
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*Server).serveConn
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/server.go:2308
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).workerFunc
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).getCh.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.612+0800        DEBUG        bili/httpClient.go:251        doRequest: https://api.bilibili.com/x/v2/search/type?access_key=***&appkey=***&area=tw&build=6400000&highlight=1&keyword=%E8%BE%89%E5%A4%9C&mobi_app=android&platform=android&pn=1&sign=***&ts=1657617964&type=7
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.788+0800        DEBUG        bili/httpClient.go:261        doRedirects: 200
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.788+0800        ERROR        bili/httpClient.go:238        doRequestJsonWithRetry: expected content-type json but text/html; charset=UTF-8
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).doRequestJsonWithRetry
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/httpClient.go:238
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).handleAndroidSearch
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/search.go:131
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.initHttpServer.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/main.go:182
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*Server).serveConn
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/server.go:2308
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).workerFunc
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).getCh.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: 2022-07-12T17:26:04.788+0800        ERROR        bili/main.go:289        expected content-type json but text/html; charset=UTF-8
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).processError
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/main.go:289
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.(*BiliroamingGo).handleAndroidSearch
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/search.go:136
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: main.initHttpServer.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /opt/bili/main.go:182
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*Server).serveConn
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/server.go:2308
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).workerFunc
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]: github.com/valyala/fasthttp.(*workerPool).getCh.func1
7月 12 17:26:04 VM-4-7-debian biliroaming-go-server[27362]:         /root/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196

cannot find http request method

美东从浏览器油猴脚本代理到**大陆nginx,nginx监听443端口并转发所有请求到本地biliroaming服务的8123端口。biliroam监听8123端口

以上操作报错
nginx:

2022/09/10 00:39:29 [error] 10034#0: *638 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 50.203.132.35, server: www.api-liziwei01-me.work, request: "GET /pgc/player/web/playurl?avid=217589598&cid=818805339&qn=0&fnver=0&fnval=4048&fourk=1&ep_id=674708&session=033a2e24f7e610fbca1fea9bc7ca8761&from_client=BROWSER&drm_tech_type=3&module=bangumi&area=&access_key=ff7d85f8e2838c64d962741fdadf9491 HTTP/2.0", upstream: "https://127.0.0.1:8123/pgc/player/web/playurl?avid=217589598&cid=818805339&qn=0&fnver=0&fnval=4048&fourk=1&ep_id=674708&session=033a2e24f7e610fbca1fea9bc7ca8761&from_client=BROWSER&drm_tech_type=3&module=bangumi&area=&access_key=ff7d85f8e2838c64d962741fdadf9491", host: "www.api-liziwei01-me.work", referrer: "https://www.bilibili.com/bangumi/play/ep674708?from_spmid=666.19.0.0"

biliroaming:

2022/09/10 00:39:29 error when serving connection "127.0.0.1:8123"<->"127.0.0.1:49364": error when reading request headers: cannot find http request method in "\x16\x03\x01\x00\xbd\x01\x00\x00\xb9\x03\x03\x1c\xa5\t3ꑱ\x80\xe3.\xebA\x8e\xe8\x8b\xf6\\X\xcc\xd9R\xca\x18\xd4\xdel\xae5\x18\x89h\x91\x00\x008\xc0,\xc00\x00\x9f̨̩̪\xc0+\xc0/\x00\x9e\xc0$\xc0(\x00k\xc0#\xc0'\x00g\xc0\n\xc0\x14\x009\xc0\t\xc0\x13\x003\x00\x9d\x00\x9c\x00=\x00<\x005\x00/\x00\xff\x01\x00\x00X\x00\v\x00\x04\x03\x00\x01\x02\x00\n\x00\f\x00\n\x00\x1d\x00\x17\x00\x1e\x00\x19\x00\x18\x00#\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\r\x000\x00.\x04\x03\x05\x03\x06\x03\b\a\b\b\b\t\b\n\b\v\b\x04\b\x05\b\x06\x04\x01\x05\x01\x06\x01\x03\x03\x02\x03\x03\x01\x02\x01\x03\x02\x02\x02\x04\x02\x05\x02\x06\x02". Buffer size=194, contents: "\x16\x03\x01\x00\xbd\x01\x00\x00\xb9\x03\x03\x1c\xa5\t3ꑱ\x80\xe3.\xebA\x8e\xe8\x8b\xf6\\X\xcc\xd9R\xca\x18\xd4\xdel\xae5\x18\x89h\x91\x00\x008\xc0,\xc00\x00\x9f̨̩̪\xc0+\xc0/\x00\x9e\xc0$\xc0(\x00k\xc0#\xc0'\x00g\xc0\n\xc0\x14\x009\xc0\t\xc0\x13\x003\x00\x9d\x00\x9c\x00=\x00<\x005\x00/\x00\xff\x01\x00\x00X\x00\v\x00\x04\x03\x00\x01\x02\x00\n\x00\f\x00\n\x00\x1d\x00\x17\x00\x1e\x00\x19\x00\x18\x00#\x00\x00\x00\x16\x00\x00\x00\x17\x00\x00\x00\r\x000\x00.\x04\x03\x05\x03\x06\x03\b\a\b\b\b\t\b\n\b\v\b\x04\b\x05\b\x06\x04\x01\x05\x01\x06\x01\x03\x03\x02\x03\x03\x01\x02\x01\x03\x02\x02\x02\x04\x02\x05\x02\x06\x02"

nginx反代配置:

user  root;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server
{
    server_name www.api-liziwei01-me.work;

    listen 443 ssl http2; 
     listen [::]:443 ssl http2;

    root /data/up1;
    client_max_body_size 128M;
    set_real_ip_from    173.245.48.0/20;
    set_real_ip_from    103.21.244.0/22;
    set_real_ip_from    103.22.200.0/22;
    set_real_ip_from    103.31.4.0/22;
    set_real_ip_from    141.101.64.0/18;
    set_real_ip_from    108.162.192.0/18;
    set_real_ip_from    190.93.240.0/20;
    set_real_ip_from    188.114.96.0/20;
    set_real_ip_from    197.234.240.0/22;
    set_real_ip_from    198.41.128.0/17;
    set_real_ip_from    162.158.0.0/15;
    set_real_ip_from    172.64.0.0/13;
    set_real_ip_from    131.0.72.0/22;
    set_real_ip_from    104.16.0.0/13;
    set_real_ip_from    104.24.0.0/14;
    # ipv6
    set_real_ip_from    2400:cb00::/32;
    set_real_ip_from    2606:4700::/32;
    set_real_ip_from    2803:f800::/32;
    set_real_ip_from    2405:b500::/32;
    set_real_ip_from    2405:8100::/32;
    set_real_ip_from    2a06:98c0::/29;
    set_real_ip_from    2c0f:f248::/32;

    real_ip_header CF-Connecting-IP;

    location / {
        proxy_pass https://127.0.0.1:8123; 
    }

    # RSA certificate
    ssl_certificate     /ssl/cert.pem;
    ssl_certificate_key /ssl/cert.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
}

    include servers/*;
}

biliroaming配置:

# 调试模式
debug: false
# 监听端口
port: 8123

# 黑名单接口
blacklistApiUrl: "https://example.com/status.php?uid=%d"
# 黑白名单模式
# 0 - 禁用
# 1 - 黑白名单
# 2 - 白名单
blockType: 1

# 设置最低漫游版本,详情看哔哩漫游仓库 versionCode
roamingMinVer: 0

# 替换泰区 aid (评论投币)
thRedirect:
  aid: 0

# 各用户(uid)限制器
limiter:
  # 每秒请求限制
  limit: 2
  # 每秒突发求请求限制
  burst: 1

# 搜索限制器
searchLimiter:
  # 每秒请求限制
  limit: 1
  # 每秒突发求请求限制
  burst: 1

# 自定义搜索强制插入内容
customSearch:
  # 插入的 json 内容
  data: '{"title":"轉生成女性向遊戲只有毀滅 END 的壞人大小姐 X(僅限港澳台地區)","cover":"https://i0.hdslb.com/bfs/bangumi/image/0f96bfc98bbf5de38c8ba1516719231f3e9b69ff.png","uri":"https://www.bilibili.com/bangumi/play/ss39010/","param":"28234702","goto":"bangumi","ptime":1625241600,"season_id":39010,"season_type":1,"season_type_name":"番剧","media_type":1,"style":"小说改/穿越/搞笑/恋爱/少女","styles":"2021 | 番剧 | 日本","cv":"卡塔莉娜·克拉艾斯:內田真禮\n吉奧爾多·斯提亞特:蒼井翔太\n吉斯·克拉艾斯:柿原徹也\n亞蘭·斯提亞特:鈴木達央\n尼克爾·亞斯卡魯特:松岡禎丞\n梅麗·亨特:岡咲美保\n索菲亞·亞斯卡魯特:水瀨祈\n瑪麗亞·坎貝爾:早見沙織\n拉斐爾·沃爾特:增田俊樹\n安·謝利:和氣杏未\n傑佛瑞·斯提亞特:子安武人\n蘇珊娜·蘭德爾:上阪堇\n伊恩·斯提亞特:白井悠介\n賽琳娜·貝格:小倉唯\n魯弗斯·布羅德:鳥海浩輔","area":"日本","staff":"原作:山口悟(一迅社文庫IRIS/一迅社刊)\n角色原案:ひだかなみ\n監督:井上圭介\n系列構成:清水惠\n角色設計:大島美和\n道具設計:松永辰\n美術監督:込山明日香\n色彩設計:重富英里\n3D監督:栗林裕紀\n攝影監督:衛藤英毅\n編輯:瀧川三智(REAL-T)\n音響監督:龜山俊樹(grooove)\n音樂:田渕夏海、中村巴奈重、齋木達彥、櫻井美希、兼松眾、中島純子、青木沙也果、佐久間奏\n音樂製作:日音\n動畫製作:SILVER LINK.","is_selection":1,"badge":"番剧","episodes":[{"position":1,"uri":"https://www.bilibili.com/bangumi/play/ep408600","param":"408600","index":"1"},{"position":2,"uri":"https://www.bilibili.com/bangumi/play/ep408601","param":"408601","index":"2"},{"position":3,"uri":"https://www.bilibili.com/bangumi/play/ep408602","param":"408602","index":"3"},{"position":4,"uri":"https://www.bilibili.com/bangumi/play/ep408603","param":"408603","index":"4"},{"position":5,"uri":"https://www.bilibili.com/bangumi/play/ep408604","param":"408604","index":"5"},{"position":6,"uri":"https://www.bilibili.com/bangumi/play/ep408605","param":"408605","index":"6"},{"position":7,"uri":"https://www.bilibili.com/bangumi/play/ep408606","param":"408606","index":"7"},{"position":8,"uri":"https://www.bilibili.com/bangumi/play/ep408607","param":"408607","index":"8"},{"position":9,"uri":"https://www.bilibili.com/bangumi/play/ep408608","param":"408608","index":"9"},{"position":10,"uri":"https://www.bilibili.com/bangumi/play/ep408609","param":"408609","index":"10"},{"position":11,"uri":"https://www.bilibili.com/bangumi/play/ep408610","param":"408610","index":"11"},{"position":12,"uri":"https://www.bilibili.com/bangumi/play/ep408611","param":"408611","index":"12"}],"label":"小说改/穿越/搞笑/恋爱/少女","watch_button":{"title":"立即观看","link":"https://www.bilibili.com/bangumi/play/ss39010"},"follow_button":{"icon":"http://i0.hdslb.com/bfs/bangumi/154b6898d2b2c20c21ccef9e41fcf809b518ebb4.png","texts":{"0":"追番","1":"已追番"},"status_report":"bangumi"},"selection_style":"grid","episodes_new":[{"title":"1","uri":"https://www.bilibili.com/bangumi/play/ep408600","param":"408600","is_new":0,"position":1},{"title":"2","uri":"https://www.bilibili.com/bangumi/play/ep408601","param":"408601","is_new":0,"position":2},{"title":"...","uri":"bilibili://search/bangumi-episodes/grid/39010","param":"0","is_new":0,"type":1},{"title":"10","uri":"https://www.bilibili.com/bangumi/play/ep408609","param":"408609","is_new":0,"position":3},{"title":"11","uri":"https://www.bilibili.com/bangumi/play/ep408610","param":"408610","is_new":0,"position":4},{"title":"12","uri":"https://www.bilibili.com/bangumi/play/ep408611","param":"408611","is_new":0,"position":5}],"is_atten":1}'
  # 插入的 json 内容
  webData: '{"type":"media_bangumi","media_id":28235221,"title":"世界頂尖的暗殺者\u003cem class=\"keyword\"\u003e轉生\u003c/em\u003e為異世界貴族(僅限港澳台地區)","org_title":"世界最高の暗殺者、異世界貴族に転生する","media_type":1,"cv":"盧各:赤羽根健治\n蒂亞:上田麗奈\n塔兒朵:高田憂希\n瑪荷:下地紫野\n","staff":"原作:月夜淚( Sneaker文庫 KADOKAWA刊)\n角色原案:れい亜\n監督:田村正文\n系列構成、腳本:高山克彥\n角色設計:長田繪裡\n總作畫監督:吉川佳織\n設計輔佐:藤井亞裡莎\n武器設計:氏家嘉宏\n道具設計:今田茜\n美術監督、美術設定:吉山裕也\n美術助理:內山明日香\n色彩設計:吉田隼人\n攝影監督:新穀優子\n圖形設計:柏原進\n3D導演:江田惠一\n編輯:瀧川三智\n音響監督:土屋雅紀\n音響效果:川田清貴\n音響製作:Glovision\n音樂:黑田賢一\n音樂製作:Lantis\n動畫製作:SILVER LINK.×studio palette\n","season_id":39528,"is_avid":false,"hit_columns":["title"],"hit_epids":"","season_type":1,"season_type_name":"番剧","selection_style":"grid","ep_size":12,"url":"https://www.bilibili.com/bangumi/play/ss39528","button_text":"立即观看","is_follow":0,"is_selection":1,"eps":[{"id":425279,"cover":"http://i0.hdslb.com/bfs/archive/c6dba6068b7400909920df6df0fb6391c5dd7a77.png","title":"1","url":"https://www.bilibili.com/bangumi/play/ep425279","release_date":"","badges":null,"index_title":"1","long_title":"信任的報償"},{"id":425317,"cover":"http://i0.hdslb.com/bfs/archive/2d1d4ffb3c1cde990f1ef7b9b61228bdf2d2a296.png","title":"2","url":"https://www.bilibili.com/bangumi/play/ep425317","release_date":"","badges":null,"index_title":"2","long_title":"轉生的交易"},{"id":425318,"cover":"http://i0.hdslb.com/bfs/archive/86d2d889773d3b990b8c5d70f59fa51cf063d23b.png","title":"3","url":"https://www.bilibili.com/bangumi/play/ep425318","release_date":"","badges":null,"index_title":"3","long_title":"友誼的魔法"},{"id":425319,"cover":"http://i0.hdslb.com/bfs/archive/73425afdfbca1e3e0e9ed1571335abfb253365b4.png","title":"4","url":"https://www.bilibili.com/bangumi/play/ep425319","release_date":"","badges":null,"index_title":"4","long_title":"女神的計劃"},{"id":425320,"cover":"http://i0.hdslb.com/bfs/archive/f26b5ba9c710fccc7ac104144e902d7962f32643.png","title":"5","url":"https://www.bilibili.com/bangumi/play/ep425320","release_date":"","badges":null,"index_title":"5","long_title":"暗殺者的資格"},{"id":425321,"cover":"http://i0.hdslb.com/bfs/archive/7f80ef0130496828c0f8deb9d267fcde64be6337.png","title":"6","url":"https://www.bilibili.com/bangumi/play/ep425321","release_date":"","badges":null,"index_title":"6","long_title":"少女之家"},{"id":425322,"cover":"http://i0.hdslb.com/bfs/archive/4d65ec20d0feb497fd558df79a2f4ec223625bcd.png","title":"7","url":"https://www.bilibili.com/bangumi/play/ep425322","release_date":"","badges":null,"index_title":"7","long_title":"虛假的生活"},{"id":425323,"cover":"http://i0.hdslb.com/bfs/archive/f5bc415d22ac506559ee444e4778ae54b62b41ab.png","title":"8","url":"https://www.bilibili.com/bangumi/play/ep425323","release_date":"","badges":null,"index_title":"8","long_title":"選擇的儀式"},{"id":425324,"cover":"http://i0.hdslb.com/bfs/archive/85bcde25840625b61180fb22087441df406280f0.png","title":"9","url":"https://www.bilibili.com/bangumi/play/ep425324","release_date":"","badges":null,"index_title":"9","long_title":"暗殺的代價"},{"id":425325,"cover":"http://i0.hdslb.com/bfs/archive/e47f1240e5b276fe353bc1b55da2ec5b8cdd2b68.png","title":"10","url":"https://www.bilibili.com/bangumi/play/ep425325","release_date":"","badges":null,"index_title":"10","long_title":"初次約會"},{"id":425326,"cover":"http://i0.hdslb.com/bfs/archive/9bacd9538974ff812826a85a42d93ee19fe6256b.png","title":"11","url":"https://www.bilibili.com/bangumi/play/ep425326","release_date":"","badges":null,"index_title":"11","long_title":"背叛的决定"},{"id":425327,"cover":"http://i0.hdslb.com/bfs/archive/02128b4622b0513d5ac02ae757d3e74d03dd633c.png","title":"12","url":"https://www.bilibili.com/bangumi/play/ep425327","release_date":"","badges":null,"index_title":"12","long_title":"暗殺者的戰鬥"}],"badges":null,"cover":"http://i0.hdslb.com/bfs/bangumi/image/0d6306a74b6a941f187359ef646e3c65be31f749.jpg","areas":"日本","styles":"小说改/穿越/战斗","goto_url":"https://www.bilibili.com/bangumi/play/ss39528","desc":"世界第一的暗殺者,作為暗殺世家的長男重生了。\n作為能夠轉生到異世界的條件,他接下了女神給下達的唯一一項任務。\n\n“殺了被預言會帶給人類災厄的‘勇者’”。\n\n這是曾經世界最強暗殺者在新的人生中必須要完成...","pubtime":1633017600,"media_mode":2,"fix_pubtime_str":"","media_score":{"score":0,"user_count":0},"display_info":null,"pgc_season_id":39528,"corner":2}'

# 自定义插入字幕
customSubtitle:
  apiUrl: "https://example.com/path?season_id=%d"
  teamName: "蒙古上单字幕组"

# 缓存时间
# 实例:"1h1m4s" / "5m1s" / "4s"
cache:
  # 用户 key
  accessKey: 168h
  # 用户资料(uid 和 大会员状态)
  user: 168h
  # 播放链接
  playUrl: 15m
  # 泰区 season
  thSeason: 15m
  # 泰区字幕(兼容老版本)
  thSubtitle: 15m

# 代理
proxy:
  cn: socks5://127.0.0.1:7890
  hk: socks5://127.0.0.1:7891
  tw: socks5://127.0.0.1:7892
  th: socks5://127.0.0.1:7893

# 反代域名
reverse:
  cn: api.bilibili.com
  hk: api.bilibili.com
  tw: api.bilibili.com
  th: app.biliintl.com

# 反代搜索域名
reverseSearch:
  cn: app.bilibili.com
  hk: app.bilibili.com
  tw: app.bilibili.com
  th: api.biliintl.com

# 反代网页搜索域名
reverseWebSearch:
  cn: api.bilibili.com
  hk: api.bilibili.com
  tw: api.bilibili.com

# 鉴权 + 缓存
auth:
  cn: true
  hk: true
  tw: true
  th: true

# 数据库
postgreSQL:
  host: "localhost"
  user: "postgres"
  password: 'postgres'
  # passwordFile: "/run/secrets/db-password"
  dbName: "postgres"
  port: 5432

切换nginx设置

real_ip_header CF-Connecting-IP;

real_ip_header X-Forwarded-For;

报错一致

7890:connection refused

{"level":"error","ts":1662699205.19463,"caller":"biliroaming-go-server/main.go:289","msg":"socks connect tcp 127.0.0.1:7890->api.bilibili.com:443: dial tcp 127.0.0.1:7890: connect: connection refused","stacktrace":"main.(*BiliroamingGo).processError\n\t/home/liziwei01/OpenSource/github.com/biliroaming-go-server/main.go:289\nmain.(*BiliroamingGo).handleWebPlayURL\n\t/home/liziwei01/OpenSource/github.com/biliroaming-go-server/playurl.go:181\nmain.initHttpServer.func1\n\t/home/liziwei01/OpenSource/github.com/biliroaming-go-server/main.go:178\ngithub.com/valyala/fasthttp.(*Server).serveConn\n\t/home/liziwei01/go/pkg/mod/github.com/valyala/[email protected]/server.go:2308\ngithub.com/valyala/fasthttp.(*workerPool).workerFunc\n\t/home/liziwei01/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224\ngithub.com/valyala/fasthttp.(*workerPool).getCh.func1\n\t/home/liziwei01/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196"}

sudo lsof -i:7890 结果为空,端口没有被占用,看代码也没找到哪里有问题

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.