Git Product home page Git Product logo

sub-web's Introduction

sub-web

基于 vue-cli 与 tindy2013/subconverter 后端实现的配置自动生成。

Table of Contents

ChangeLog

  • 20200730

    • 独立各类后端配置到 .env 文件中,现在修改后端只需要修改 .env 即可。

Docker

docker run -d -p 58080:80 --restart always --name subweb careywong/subweb:latest

若需要对代码进行修改,你需要在本地构建镜像并运行。 注:每次修改代码,你都需要重新执行 docker build 来执行打包操作。

docker -v
Docker version 23.0.4, build f480fb1

docker build -t subweb-local:latest .
docker run -d -p 58080:80 --restart always --name subweb subweb-local:latest

Requirements

你需要安装 NodeYarn 来安装依赖与打包发布。你可以通过以下命令查看是否安装成功。 注:以下步骤为 Ubuntu 下相应命令,其他系统请自行修改。为了方便后来人解决问题,有问题请发 issue。

node -v
v16.20.0

yarn -v
1.22.19

Install

yarn install

Usage

yarn serve

浏览器访问 http://localhost:8080/

Deploy

发布到线上环境,你需要安装依赖,执行以下打包命令,生成的 dist 目录即为发布目录。如需修改默认后端,请修改 src/views/Subconverter.vue 中 defaultBackend 配置项。

yarn build

你需要安装 nginx (或其他 web 服务器)并正确配置。以下为示例配置,你需要修改 example.com 为自己域名并配置正确的项目根路径(https 自行配置)。

server {
    listen 80;
    server_name example.com;

    root /var/www/http/sub-web/dist;
    index index.html index.htm;

    error_page 404 /index.html;

    gzip on; #开启gzip压缩
    gzip_min_length 1k; #设置对数据启用压缩的最少字节数
    gzip_buffers 4 16k;
    gzip_http_version 1.0;
    gzip_comp_level 6; #设置数据的压缩等级,等级为1-9,压缩比从小到大
    gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; #设置需要压缩的数据格式
    gzip_vary on;

    location ~* \.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff)$ {
        access_log off;
        add_header Cache-Control "public,max-age=30*24*3600";
    }
}

Related

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2020 CareyWang

sub-web's People

Contributors

careywang avatar dependabot[bot] avatar hicasper avatar sleepyheeead avatar sowevo avatar youshandefeiyang avatar zhongfly 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  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

sub-web's Issues

SSR转换不正常

我在将节点转换成SSR订阅地址时,地址内出现了此内容:
CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK

模式设置问题

image

您好,我想问一下修改哪个文件可以让他默认选择基础模式

Clash -> v2ray issue

When trying to convert a perfectly working clash yaml into v2ray its not working. The V2ray link it's empty.

转换ss plugin参数有误

转换成ss plugin是simple-obfs 但是ss启动的参数名称是obfs-local (导致openwrt订阅后启动失败,标准obfs-local启动文件只有这个,不认simple-obfs )
选SSAndroid转换出来是对的 plugin: "obfs-local",

上传配置文件限制

你好。。我想上传一个自己的配置文件,基于ACL4SSR full修改的,但是好像超出3000个的限制了。。。难受了

api.wcc.best无法识别部分SSR节点

233cloud机场的订阅,api.wcc.best无法找到可用的节点信息,而同样的订阅在subcon.py6.pw是可用的,应该不是前端问题,前端是正常转换成功了的,也许可能是部署的后端问题?

language

hi, how can I change/ translate from CN to EN?
thank you

.env 配置在 Docker 中不起作用

使用命令:

docker build -t miyouzi/subweb:0.1 .
docker run -d -p 58080:80 --restart always --name subweb miyouzi/subweb:0.1

使用 Nginx 反代
image
image
image

Maying Profile

自定义配置文件中 maying.ini 的 Proxy组已经包含了telegram的规则,但是策略中telegram规则在proxy下面,导致telegram代理时优先匹配proxy策略,而telegram策略无效。

大佬,运行docker-compose up -d显示这个

[root@VM-4-5-centos sub-web]# docker-compose up -d
Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

Supported filenames: docker-compose.yml, docker-compose.yaml, fig.yml, fig.yaml
[root@VM-4-5-centos sub-web]#

运行报错

`
[root@HK-Server-1 sub-web]# yarn serve
yarn run v1.22.10
$ vue-cli-service serve
/root/sub-web/node_modules/open/index.js:16
const wslToWindowsPath = async path => {
^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/root/sub-web/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

`

执行 docker-compose up -d 报错

root@debian:~/sub-web# docker-compose up -d
报错信息如下:
ERROR: yaml.scanner.ScannerError: while scanning a plain scalar
in "./docker-compose.yaml", line 19, column 73
found unexpected ':'
in "./docker-compose.yaml", line 19, column 85

请问下这个怎么解决呢?感谢!

希望能增加pwa的支持!

平时用sub-web的频率比较高,有时候实在懒得打开浏览器,还得输入一遍网站,比较麻烦,希望加入pwa的支持,那样就更好了!

节点问题

订阅连接我使用了含有vmess和ss复合多线路的配置文件

然后转换成clash配置正常,转换成surge4配置的时候ss节点全部没了。

Multiple Remarks

Are multiple remarks accepted? As if i wanted to include/exclude multiple keywords server

web中直接上传配置不能使用

我上传了如下的配置(一个subconverter中的预设配置),但是出来的结果并不是按照它所写的这样,请问是我这个配置文件用的不对还是存在bug啊
Screen Shot 2020-07-14 at 17 52 51

用NGINX配置,为什么总是提示要打开JAVASCIPT呢?

请教一下,我的NGINX配置如下,其中DIST是运行 yarn build生成的,所以NODEJS和YARN都是安装没问题的。

location /web {
  alias /home/subweb/dist;
}

目前访问 domain.com/web 页面的时候,打开的是空白页面,查看源码提示如下:

  <title>sub-web</title>We're sorry but sub-web doesn't work properly without JavaScript enabled. Please enable it to continue.
<script src=/js/chunk-vendors.f8fb536e.js></script><script src=/js/app.49500d23.js></script>

生成的dist会显示白屏

使用yarn serve能够正常显示。
vue.config.js第七行下添加publicPath: './',后能够显示ico图标,但是页面仍然空白

繁体解析不了

节点信息是繁体的,现在会提示不包含任何节点信息

image

其他家可以正常解析订阅地址
image

OpenClash Issues

问题:
本人目前使用Nanopi R2S软路由,系统用的是FriendlyWRT/OpenWRT,客户端是OpenClash。
机场选用的是JMS,从官网拷贝订阅链接,在订阅转换界面选择“Clash”。
将“定制订阅”的结果导入OpenClash后提示“格式错误”。
解决方法:
手动编辑配置文件,将"proxies"的"name"字段内容前后加上引号,问题解决。
原因
可能是JMS机场订阅提供的name字段里有':'符号,造成格式解析错误。
Workaround
“模式设置”选择“进阶模式”,右下方“更多选项”,勾选“节点类型”,再点击“生成订阅链接”,再复制就可以了

基础模式 页面 缓存问题

我想问一下 每次基础模式生成订阅之后,刷新浏览器之后 ,原订阅链接仍然在页面上,请问怎么改变,刷新或短时间清除之前填的链接。
是修改env 的vue ttl 时间吗?更改之后不起作用。

Maying配置文件里的日本节点显示**国旗

您好,Maying的配置文件的JP节点一直是**国旗,这个问题是否应该修复一下呢?

P.S.:本人刚刚脑袋崩掉打成了JP显示日本国旗,估计没睡醒,补觉去了。。。(逃

include_remarks from .ini file

If i use option inlcude remarks from website it's working perfectly, but if i use a .ini file that has the following line:

include_remarks=(香港)

Still i can see all server, is not filtering.

This line is ok!

exclude_remarks=(abc)

这个变更的兼容性能适配吗?

上游 Clash 核心已移除前向兼容代码

包括但不限于

  • 不再解析 "Proxy" "Proxy Group" "Rule" 字段 而 使用 "proxies" "proxy-groups" "rules"
  • 不再解析 "rule-provider" 而使用 "rule-providers"
  • 不再解析 Shadowsocks 协议的 "obfs", "obfs-host" 而 使用 "plugin" "plugin-opts"
  • 不再解析 "FINAL" "SOURCE-IP-CIDR" 而 使用 "MATCH" "SRC-IP-CIDR"

Clash for Android 会为该变更保留 2个月 的前向兼容 各位 用户 及 提供商 尽快适配新的配置文件规范

参见 commit

  • 2781090
  • e57a13e

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.