Browse Source

Merge branch 'develop'

dependabot/npm_and_yarn/axios-0.21.1
CareyWong 4 years ago
parent
commit
da0731e1d7
  1. 20
      .env
  2. 5
      .env.example
  3. 1
      .gitignore
  4. 42
      README.md
  5. 27
      docker-compose.yaml
  6. 32
      docs/customized/maying.ini
  7. 35
      docs/customized/nexitally.ini
  8. 30
      docs/customized/yoyu.ini
  9. 30
      docs/customized/ytoo.ini
  10. 35
      docs/customized/zeichuan.ini
  11. 35
      docs/special/netease.ini
  12. 32
      docs/universal/no-urltest.ini
  13. 31
      docs/universal/urltest.ini
  14. 54
      src/views/Subconverter.vue

20
.env

@ -0,0 +1,20 @@
VUE_APP_PROJECT = "https://github.com/CareyWang/sub-web"
VUE_APP_BOT_LINK = "https://t.me/CareyWong_bot"
VUE_APP_BACKEND_RELEASE = "https://github.com/tindy2013/subconverter/releases"
VUE_APP_SUBCONVERTER_REMOTE_CONFIG = "https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/example_external_config.ini"
# API 后端
VUE_APP_SUBCONVERTER_DEFAULT_BACKEND = "https://api.wcc.best"
# 短链接后端
VUE_APP_MYURLS_DEFAULT_BACKEND = "https://suo.yt"
# 文本托管后端
VUE_APP_CONFIG_UPLOAD_BACKEND = "https://api.wcc.best"
# 页面配置
VUE_APP_USE_STORAGE = true
VUE_APP_CACHE_TTL = 86400

5
.env.example

@ -1,5 +0,0 @@
SUBWEB_PORT=58080
MYURLS_PORT=8002
MYURLS_DOMAIN=example.com
MYURLS_TTL=90

1
.gitignore

@ -5,7 +5,6 @@ node_modules
# local env files
.env.local
.env.*.local
.env
# Log files
npm-debug.log*

42
README.md

@ -4,46 +4,28 @@
## Table of Contents
- [Update](#Update)
- [ChangeLog](#ChangeLog)
- [Docker](#Docker)
- [Requirements](#Requirements)
- [Install](#install)
- [Usage](#usage)
- [Related](#Related)
- [Contributing](#contributing)
- [License](#license)
## Update
## ChangeLog
- 20200324
- 现在你可以使用 docker-compose 启动前端及短链接服务,服务端口及其他参数请自行在 .env 中配置。
- 20200730
```shell
git clone https://github.com/CareyWang/sub-web.git sub-web
- 独立各类后端配置到 .env 文件中,现在修改后端只需要修改 .env 即可。
cd sub-web
cp .env.example .env
docker-compose up -d
```
- 20200309
- 由于 bitly 免费账户月调用量限制,现在你可以放弃bitly,使用本地部署的短链接服务。参考 [MyUrls](https://github.com/CareyWang/MyUrls) 搭建。
- 20200301
- 现在你可以使用 docker 部署
```shell
docker run -d -p 58080:80 --restart always --name subweb careywong/subweb:latest
```
- 20200227
- 提供了短链接服务,可用于缩短生成的订阅 url,请和谐使用。
> 注:需要后端支持。自行搭建服务,请参考 [bitly](https://github.com/CareyWang/bitly) 并修改 src/views/Subconverter.vue 中 **shortUrlBackend** 配置项。
## Docker
```shell
docker run -d -p 58080:80 --restart always --name subweb careywong/subweb:latest
```
若需要对代码进行修改,你需要在本地构建镜像并运行。
注:每次修改代码,你都需要重新执行 docker build 来执行打包操作。
@ -112,6 +94,12 @@ server {
}
```
## Related
- [tindy2013/subconverter](https://github.com/tindy2013/subconverter)
- [CareyWang/MyUrls](https://github.com/CareyWang/MyUrls)
- [CareyWang/bitly](https://github.com/CareyWang/bitly)
## Contributing
PRs accepted.

27
docker-compose.yaml

@ -1,27 +0,0 @@
version: "3"
services:
subweb:
build: .
container_name: subweb
restart: always
ports:
- "${SUBWEB_PORT}:80"
myurls:
image: "careywong/myurls:latest"
container_name: myurls
restart: always
env_file: .env
ports:
- "${MYURLS_PORT}:8002"
depends_on:
- myurls-redis
entrypoint: ["/app/myurls", "-domain", "${MYURLS_DOMAIN}", "-conn", myurls-redis:6379, "-ttl", "${MYURLS_TTL}"]
myurls-redis:
image: "redis:5"
container_name: myurls-redis
restart: always
expose:
- "6379"

32
docs/customized/maying.ini

@ -1,32 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=HKMTMedia,rules/ConnersHua/Surge/Ruleset/HKMTMedia.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=HKMTMedia`select`[]DIRECT`[]Proxy`[]🚀 HK`[]🚀 TW
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 HK`select`港
custom_proxy_group=🚀 SG`select`新加坡|狮城
custom_proxy_group=🚀 TW`select`台|新北|彰化
custom_proxy_group=🚀 JP`select`日((?!用).)+|东京|大阪|埼玉
custom_proxy_group=🚀 US`select`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图
;设置分组标志位

35
docs/customized/nexitally.ini

@ -1,35 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Netease,rules/lhie1/Surge3/Netease Music.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=HKMTMedia,rules/ConnersHua/Surge/Ruleset/HKMTMedia.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]🚀 CN`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Netease`select`[]DIRECT`[]Proxy`[]🚀 CN`NeteaseUnblock
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=HKMTMedia`select`[]DIRECT`[]Proxy`[]🚀 CN`[]🚀 HK`[]🚀 TW
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 HK`select`Hong Kong
custom_proxy_group=🚀 SG`select`Singapore
custom_proxy_group=🚀 TW`select`Taiwan
custom_proxy_group=🚀 JP`select`Japan
custom_proxy_group=🚀 US`select`USA
custom_proxy_group=🚀 CN`select`China
;设置分组标志位

30
docs/customized/yoyu.ini

@ -1,30 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]🚀 日用`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 日用`url-test`日用`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 HK`select`港
custom_proxy_group=🚀 SG`select`新加坡|狮城
custom_proxy_group=🚀 TW`url-test`台|新北|彰化`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 JP`url-test`日((?!用).)+|东京|大阪|埼玉`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 US`url-test`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图`http://www.gstatic.com/generate_204`600
;设置分组标志位

30
docs/customized/ytoo.ini

@ -1,30 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]🚀 日用`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 日用`url-test`日用`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 HK`select`港`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 SG`select`新加坡|狮城`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 TW`url-test`台|新北|彰化`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 JP`url-test`日((?!用).)+|东京|大阪|埼玉`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 US`url-test`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图`http://www.gstatic.com/generate_204`600
;设置分组标志位

35
docs/customized/zeichuan.ini

@ -1,35 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Netease,rules/lhie1/Surge3/Netease Music.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=HKMTMedia,rules/ConnersHua/Surge/Ruleset/HKMTMedia.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]🚀 Other`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Netease`select`[]DIRECT`[]Proxy`[]🚀 CN`NeteaseUnblock
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=HKMTMedia`select`[]DIRECT`[]Proxy`[]🚀 CN`[]🚀 HK`[]🚀 TW
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 HK`select`Hong Kong
custom_proxy_group=🚀 SG`select`Singapore
custom_proxy_group=🚀 TW`select`Taiwan
custom_proxy_group=🚀 JP`select`Japan
custom_proxy_group=🚀 US`select`America
custom_proxy_group=🚀 Other`select`England|India
;设置分组标志位

35
docs/special/netease.ini

@ -1,35 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Netease,rules/lhie1/Surge3/Netease Music.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=HKMTMedia,rules/ConnersHua/Surge/Ruleset/HKMTMedia.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]Fallback`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Netease`select`[]DIRECT`[]Proxy`NeteaseUnblock
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=HKMTMedia`select`[]DIRECT`[]Proxy`[]🚀 HK`[]🚀 TW
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=Fallback`fallback`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`http://www.gstatic.com/generate_204`300
custom_proxy_group=🚀 HK`select`港`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 SG`select`新加坡|狮城`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 TW`select`台|新北|彰化`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 JP`select`日((?!用).)+|东京|大阪|埼玉`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 US`select`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图`http://www.gstatic.com/generate_204`600
;设置分组标志位

32
docs/universal/no-urltest.ini

@ -1,32 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=HKMTMedia,rules/ConnersHua/Surge/Ruleset/HKMTMedia.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=HKMTMedia`select`[]DIRECT`[]Proxy`[]🚀 HK`[]🚀 TW
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=🚀 HK`select`港`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 SG`select`新加坡|狮城`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 TW`select`台|新北|彰化`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 JP`select`日((?!用).)+|东京|大阪|埼玉`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 US`select`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图`http://www.gstatic.com/generate_204`600
;设置分组标志位

31
docs/universal/urltest.ini

@ -1,31 +0,0 @@
;设置规则标志位
surge_ruleset=DIRECT,rules/NobyDa/Surge/Download.list
surge_ruleset=REJECT,rules/ConnersHua/Surge/Ruleset/Hijacking.list
surge_ruleset=Apple,rules/ConnersHua/Surge/Ruleset/Apple.list
surge_ruleset=Telegram,rules/ConnersHua/Surge/Ruleset/Telegram.list
surge_ruleset=Youtube,rules/ConnersHua/Surge/Ruleset/Media/YouTube.list
surge_ruleset=Netflix,rules/ConnersHua/Surge/Ruleset/Media/Netflix.list
surge_ruleset=GlobalMedia,rules/ConnersHua/Surge/Ruleset/GlobalMedia.list
surge_ruleset=DIRECT,rules/LocalAreaNetwork.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/Unbreak.list
surge_ruleset=DIRECT,rules/ConnersHua/Surge/Ruleset/China.list
surge_ruleset=Proxy,rules/ConnersHua/Surge/Ruleset/Global.list·
surge_ruleset=DIRECT,[]GEOIP,CN
surge_ruleset=Final,[]MATCH
;设置规则标志位
;设置分组标志位
custom_proxy_group=Proxy`select`[]DIRECT`[]Fallback`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`.*
custom_proxy_group=Apple`select`[]DIRECT`[]Proxy
custom_proxy_group=Telegram`select`[]Proxy`[]🚀 HK`[]🚀 SG
custom_proxy_group=Youtube`select`[]Proxy`[]🚀 HK`[]🚀 US
custom_proxy_group=Netflix`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`NF|Netflix|NETFLIX|原生|解锁
custom_proxy_group=GlobalMedia`select`[]Proxy`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`[]DIRECT
custom_proxy_group=Final`select`[]Proxy`[]DIRECT
custom_proxy_group=Fallback`fallback`[]🚀 HK`[]🚀 SG`[]🚀 JP`[]🚀 US`[]🚀 TW`http://www.gstatic.com/generate_204`300
custom_proxy_group=🚀 HK`url-test`港`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 SG`url-test`新加坡|狮城`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 TW`url-test`台|新北|彰化`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 JP`url-test`日((?!用).)+|东京|大阪|埼玉`http://www.gstatic.com/generate_204`600
custom_proxy_group=🚀 US`url-test`美|洛杉矶|硅谷|达拉斯|费利蒙|凤凰城|芝加哥|圣何塞|西雅图`http://www.gstatic.com/generate_204`600
;设置分组标志位

54
src/views/Subconverter.vue

@ -21,6 +21,7 @@
type="textarea"
rows="3"
placeholder="支持订阅或ss/ssr/vmess单链接。多个链接请每行一个或用 | 分隔"
@blur="saveSubUrl"
/>
</el-form-item>
<el-form-item label="客户端:">
@ -218,14 +219,13 @@
</template>
<script>
const project = "https://github.com/CareyWang/sub-web";
const remoteConfigSample =
"https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/example_external_config.ini";
const gayhubRelease = "https://github.com/tindy2013/subconverter/releases";
const defaultBackend = "https://api.wcc.best/sub?";
const shortUrlBackend = "https://api.suo.yt/short";
const configUploadBackend = "https://api.wcc.best/config/upload";
const tgBotLink = "https://t.me/CareyWong_bot";
const project = process.env.VUE_APP_PROJECT
const remoteConfigSample = process.env.VUE_APP_SUBCONVERTER_REMOTE_CONFIG
const gayhubRelease = process.env.VUE_APP_BACKEND_RELEASE
const defaultBackend = process.env.VUE_APP_SUBCONVERTER_DEFAULT_BACKEND + '/sub?'
const shortUrlBackend = process.env.VUE_APP_MYURLS_DEFAULT_BACKEND + '/short'
const configUploadBackend = process.env.VUE_APP_CONFIG_UPLOAD_BACKEND + '/config/upload'
const tgBotLink = process.env.VUE_APP_BOT_LINK
export default {
data() {
@ -391,6 +391,11 @@ export default {
created() {
document.title = "Subscription Converter";
this.isPC = this.$getOS().isPc;
// url cache
if (process.env.VUE_APP_USE_STORAGE === 'true') {
this.form.sourceSubUrl = this.getLocalStorageItem('sourceSubUrl')
}
},
mounted() {
this.form.clientType = "clash";
@ -624,7 +629,40 @@ export default {
this.backendVersion = res.data.replace(/backend\n$/gm, "");
this.backendVersion = this.backendVersion.replace("subconverter", "");
});
},
saveSubUrl() {
if (this.form.sourceSubUrl !== '') {
this.setLocalStorageItem('sourceSubUrl', this.form.sourceSubUrl)
}
},
getLocalStorageItem(itemKey) {
const now = +new Date()
let ls = localStorage.getItem(itemKey)
let itemValue = ''
if (ls !== null) {
let data = JSON.parse(ls)
if (data.expire > now) {
itemValue = data.value
} else {
localStorage.removeItem(itemKey)
}
}
return itemValue
},
setLocalStorageItem(itemKey, itemValue) {
const ttl = process.env.VUE_APP_CACHE_TTL
const now = +new Date()
let data = {
setTime: now,
ttl: parseInt(ttl),
expire: now + ttl * 1000,
value: itemValue
}
localStorage.setItem(itemKey, JSON.stringify(data))
}
},
};
</script>

Loading…
Cancel
Save