CtkGHoSt / glider-converter

Based on the https://github.com/tindy2013/subconverter project, converting various protocols to glider-supported formats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glider-converter

Based on the https://github.com/tindy2013/subconverter project, converting various protocols to glider-supported formats

基于 https://github.com/tindy2013/subconverter 项目,转换各种协议为glider支持的格式
推荐使用https://acl4ssr-sub.github.io/ 转换为clash node

Usage

from converter import load_nodes, converter

# clash subconverter node订阅链接
# clash subconverter node subscription links
link = 'abc.com'

# 获取节点信息
# Get node information
nodes = load_nodes(link)

# 转换为glider支持的样式
# Convert to glider scheme
for node in nodes:
    print(converter(node))

Supported Protocols

Protocol convert Description
ss ss://method:pass@host:port
ssr ssr://method:pass@host:port?protocol=xxx&protocol_param=yyy&obfs=zzz&obfs_param=xyz
trojan trojan://pass@host:port[?serverName=SERVERNAME][&skipVerify=true][&cert=PATH]
VMess vmess://[security:]uuid@host:port[?alterID=num]
tls tls://host:port[?serverName=SERVERNAME][&skipVerify=true]
ws ws://host:port[/path][?serverName=SERVERNAME][&skipVerify=true]

Protocol Chains

目前支持vmess代理链/Currently supports vmess proxy chains:

example:

node = {'name': 'example node',
 'server': 'converter.example.net',
 'port': 80,
 'type': 'vmess',
 'uuid': 'aaaaaaaa-bbbb-dddd-ffff-tttttttttttt',
 'alterId': 0,
 'cipher': 'auto',
 'tls': True,
 'skip-cert-verify': False,
 'network': 'ws',
 'ws-opts': {'path': '/windows', 'headers': {'Host': 'host.example.com'}},
 'udp': True}

conversion protocol chain converter(node):

tls://converter.example.net:80?skipVerify=false,ws://@/windows?host=host.example.com,vmess://aaaaaaaa-bbbb-dddd-ffff-tttttttttttt@:?alterID=0

TODO

  • 忘记requirements.txt了
  • 根据订阅链接生成glider.conf

Links

About

Based on the https://github.com/tindy2013/subconverter project, converting various protocols to glider-supported formats

License:GNU General Public License v3.0


Languages

Language:Python 100.0%