Compare commits

...

14 Commits

Author SHA1 Message Date
asdlokj1qpi23
d68a2217fe Fix bugs in vless reality protocol for Clash Meta and Singbox. Fix bug in hy2 for Singbox. 2023-12-21 14:25:33 +08:00
asdlokj1qpi23
ca6042bb8c fix hysteria2 password empty bug 2023-12-21 11:01:08 +08:00
asdlokj1qpi23
3b7b519584 remove shadowsocksr for singbox 2023-12-21 10:21:59 +08:00
asdlokj1qpi23
26f8f51eb5 fix vless support bug 2023-12-20 11:06:02 +08:00
asdlokj1qpi23
9f8067ab11 fix singbox transport of websocket bug 2023-12-20 10:42:42 +08:00
asdlokj1qpi23
3938ebfce9 add vless reality support. 2023-12-19 17:20:26 +08:00
asdlokj1qpi23
0b15d63ef4 add vless reality support. 2023-12-19 15:20:23 +08:00
asdlokj1qpi23
c9e074daf7 Update docker actions. 2023-12-18 18:14:21 +08:00
asdlokj1qpi23
0409830b3f Fix the issue of Clash subscription password being numeric-only 2023-12-18 17:57:56 +08:00
asdlokj1qpi23
4563be3d45 add vless to singbox 2023-12-18 11:18:07 +08:00
asdlokj1qpi23
615b3a404e change readme 2023-12-18 10:12:01 +08:00
mzixofjsla
6b29778351 change docker config 2023-12-14 19:31:04 +08:00
mzixofjsla
3cc58f38dd add Hysteria,Hysteria2 support clash and singbox,add vless support clash.fix stash Hysteria2 config error. 2023-12-14 19:28:08 +08:00
mzixofjsla
81d9167840 1 2023-12-14 19:23:40 +08:00
11 changed files with 3061 additions and 2698 deletions

View File

@@ -39,7 +39,7 @@ jobs:
with:
platforms: linux/amd64
context: scripts/
tags: tindy2013/subconverter:latest
tags: asdlokj1qpi23/subconverter:latest
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
outputs: type=image,push=true
@@ -60,7 +60,7 @@ jobs:
with:
platforms: linux/amd64
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}
outputs: type=image,push=true
- name: Save digest
@@ -106,7 +106,7 @@ jobs:
with:
platforms: linux/386
context: scripts/
tags: tindy2013/subconverter:latest
tags: asdlokj1qpi23/subconverter:latest-x86
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
outputs: type=image,push=true
@@ -127,7 +127,7 @@ jobs:
with:
platforms: linux/386
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-x86
outputs: type=image,push=true
- name: Save digest
@@ -173,7 +173,7 @@ jobs:
with:
platforms: linux/arm/v7
context: scripts/
tags: tindy2013/subconverter:latest
tags: asdlokj1qpi23/subconverter:latest-armv7
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
THREADS=4
@@ -195,7 +195,7 @@ jobs:
with:
platforms: linux/arm/v7
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
build-args: |
THREADS=4
outputs: type=image,push=true
@@ -243,7 +243,7 @@ jobs:
with:
platforms: linux/arm64
context: scripts/
tags: tindy2013/subconverter:latest
tags: asdlokj1qpi23/subconverter:latest-arm64
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
THREADS=4
@@ -265,7 +265,7 @@ jobs:
with:
platforms: linux/arm64
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
build-args: |
THREADS=4
outputs: type=image,push=true

View File

@@ -21,24 +21,24 @@ Utility to convert between various proxy subscription formats.
## Supported Types
| Type | As Source | As Target | Target Name |
| ------------ | :--------: | :----------: | ----------- |
| Clash | ✓ | ✓ | clash |
| ClashR | ✓ | ✓ | clashr |
| Quantumult | ✓ | ✓ | quan |
| Quantumult X | ✓ | ✓ | quanx |
| Loon | ✓ | ✓ | loon |
| SS (SIP002) | ✓ | ✓ | ss |
| SS Android | ✓ | ✓ | sssub |
| SSD | ✓ | ✓ | ssd |
| SSR | ✓ | ✓ | ssr |
| Surfboard | ✓ | ✓ | surfboard |
| Surge 2 | ✓ | ✓ | surge&ver=2 |
| Surge 3 | ✓ | ✓ | surge&ver=3 |
| Surge 4 | ✓ | ✓ | surge&ver=4 |
| V2Ray | ✓ | ✓ | v2ray |
| Telegram-liked HTTP/Socks 5 links | ✓ | × | Only as source |
| Type | As Source | As Target | Target Name |
|-----------------------------------|:---------:| :----------: |----------------|
| Clash | ✓ | ✓ | clash |
| ClashR | ✓ | ✓ | clashr |
| Quantumult | ✓ | ✓ | quan |
| Quantumult X | ✓ | ✓ | quanx |
| Loon | ✓ | ✓ | loon |
| SS (SIP002) | ✓ | ✓ | ss |
| SS Android | ✓ | ✓ | sssub |
| SSD | ✓ | ✓ | ssd |
| SSR | ✓ | ✓ | ssr |
| Surfboard | ✓ | ✓ | surfboard |
| Surge 2 | ✓ | ✓ | surge&ver=2 |
| Surge 3 | ✓ | ✓ | surge&ver=3 |
| Surge 4 | ✓ | ✓ | surge&ver=4 |
| V2Ray | ✓ | ✓ | v2ray |
| Telegram-liked HTTP/Socks 5 links | ✓ | × | Only as source |
| Singbox | × | ✓ | singbox |
Notice:
1. Shadowrocket users should use `ss`, `ssr` or `v2ray` as target.

View File

@@ -5,7 +5,7 @@
;For more available options, please check the readme section
target=clash
url=ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpwYXNzd29yZA@www.example.com:1080#Example
url=trojan://65474277@sqcu.hostmsu.ru:55551?allowinsecure=0&peer=mza.hkfq.xyz&mux=1&ws=0&wspath=&wshost=&ss=0&ssmethod=aes-128-gcm&sspasswd=&group=#%E9%A6%99%E6%B8%AFCN2-MZA%E8%8A%82%E7%82%B9-%E5%AE%BF%E8%BF%81%E8%81%94%E9%80%9A%E4%B8%AD%E8%BD%AC
;config=config/example_external_config.ini
;ver=3
;udp=true

View File

@@ -35,7 +35,7 @@ RUN set -xe && \
cmake -DCMAKE_CXX_STANDARD=11 . && \
make install -j $THREADS && \
cd .. && \
git clone https://github.com/tindy2013/subconverter --depth=1 && \
git clone https://github.com/asdlokj1qpi23/subconverter --depth=1 && \
cd subconverter && \
[ -n "$SHA" ] && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h;\
python3 -m ensurepip && \

View File

@@ -1,7 +1,7 @@
import glob
import os, sys
MAIN_IMAGE_NAME="tindy2013/subconverter"
MAIN_IMAGE_NAME="asdlokj1qpi23/subconverter"
TARGET_TAG="latest" if len(sys.argv) < 2 else sys.argv[1]
args=["docker manifest create {}:{}".format(MAIN_IMAGE_NAME, TARGET_TAG)]

File diff suppressed because it is too large Load Diff

View File

@@ -34,6 +34,7 @@ struct extra_settings
std::string quanx_dev_id;
tribool udp = tribool();
tribool tfo = tribool();
tribool xudp = tribool();
tribool skip_cert_verify = tribool();
tribool tls13 = tribool();
bool clash_classical_ruleset = false;
@@ -71,5 +72,5 @@ std::string proxyToQuan(std::vector<Proxy> &nodes, const std::string &base_conf,
void proxyToQuan(std::vector<Proxy> &nodes, INIReader &ini, std::vector<RulesetContent> &ruleset_content_array, const ProxyGroupConfigs &extra_proxy_group, extra_settings &ext);
std::string proxyToSSD(std::vector<Proxy> &nodes, std::string &group, std::string &userinfo, extra_settings &ext);
std::string proxyToSingBox(std::vector<Proxy> &nodes, const std::string &base_conf, std::vector<RulesetContent> &ruleset_content_array, const ProxyGroupConfigs &extra_proxy_group, extra_settings &ext);
#endif // SUBEXPORT_H_INCLUDED
void replaceAll(std::string& input, const std::string& search, const std::string& replace);
#endif // SUBEXPORT_H_INCLUDED

View File

@@ -9,8 +9,7 @@
using String = std::string;
using StringArray = std::vector<String>;
enum class ProxyType
{
enum class ProxyType {
Unknown,
Shadowsocks,
ShadowsocksR,
@@ -20,36 +19,44 @@ enum class ProxyType
HTTP,
HTTPS,
SOCKS5,
WireGuard
WireGuard,
VLESS,
Hysteria,
Hysteria2
};
inline String getProxyTypeName(ProxyType type)
{
switch(type)
{
case ProxyType::Shadowsocks:
return "SS";
case ProxyType::ShadowsocksR:
return "SSR";
case ProxyType::VMess:
return "VMess";
case ProxyType::Trojan:
return "Trojan";
case ProxyType::Snell:
return "Snell";
case ProxyType::HTTP:
return "HTTP";
case ProxyType::HTTPS:
return "HTTPS";
case ProxyType::SOCKS5:
return "SOCKS5";
default:
return "Unknown";
inline String getProxyTypeName(ProxyType type) {
switch (type) {
case ProxyType::Shadowsocks:
return "SS";
case ProxyType::ShadowsocksR:
return "SSR";
case ProxyType::VMess:
return "VMess";
case ProxyType::Trojan:
return "Trojan";
case ProxyType::Snell:
return "Snell";
case ProxyType::HTTP:
return "HTTP";
case ProxyType::HTTPS:
return "HTTPS";
case ProxyType::SOCKS5:
return "SOCKS5";
case ProxyType::WireGuard:
return "WireGuard";
case ProxyType::VLESS:
return "Vless";
case ProxyType::Hysteria:
return "Hysteria";
case ProxyType::Hysteria2:
return "Hysteria2";
default:
return "Unknown";
}
}
struct Proxy
{
struct Proxy {
ProxyType Type = ProxyType::Unknown;
uint32_t Id = 0;
uint32_t GroupId = 0;
@@ -81,6 +88,7 @@ struct Proxy
String QUICSecret;
tribool UDP;
tribool XUDP;
tribool TCPFastOpen;
tribool AllowInsecure;
tribool TLS13;
@@ -99,6 +107,19 @@ struct Proxy
uint16_t KeepAlive = 0;
String TestUrl;
String ClientId;
String Auth;
String Alpn;
String UpMbps;
String DownMbps;
String Insecure;
String Fingerprint;
String OBFSPassword;
String GRPCServiceName;
String GRPCMode;
String ShortId;
String Flow;
bool FlowShow = false;
};
#define SS_DEFAULT_GROUP "SSProvider"
@@ -109,5 +130,8 @@ struct Proxy
#define TROJAN_DEFAULT_GROUP "TrojanProvider"
#define SNELL_DEFAULT_GROUP "SnellProvider"
#define WG_DEFAULT_GROUP "WireGuardProvider"
#define XRAY_DEFAULT_GROUP "XRayProvider"
#define HYSTERIA_DEFAULT_GROUP "HysteriaProvider"
#define HYSTERIA2_DEFAULT_GROUP "Hysteria2Provider"
#endif // PROXY_H_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@@ -19,13 +19,15 @@ enum class ConfType
SUB,
Local
};
void hysteriaConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &auth, const std::string &host, const std::string &up, const std::string &down, const std::string &alpn, const std::string &obfsParam, const std::string &insecure ,tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void hysteria2Construct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &password, const std::string &host, const std::string &up, const std::string &down, const std::string &alpn, const std::string &obfsParam, const std::string &obfsPassword, const std::string &insecure ,tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls,const std::string &pkd, const std::string &sid, const std::string &fp, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void vmessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls, const std::string &sni, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void ssrConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &protocol, const std::string &method, const std::string &obfs, const std::string &password, const std::string &obfsparam, const std::string &protoparam, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool());
void ssConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &password, const std::string &method, const std::string &plugin, const std::string &pluginopts, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void socksConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &username, const std::string &password, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool());
void httpConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &username, const std::string &password, bool tls, tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void trojanConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &password, const std::string &network, const std::string &host, const std::string &path, bool tlssecure, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void trojanConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &password, const std::string &network, const std::string &host, const std::string &path,const std::string &fp, bool tlssecure, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
void snellConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &password, const std::string &obfs, const std::string &host, uint16_t version = 0, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool());
void explodeVmess(std::string vmess, Proxy &node);
void explodeSSR(std::string ssr, Proxy &node);
@@ -33,8 +35,15 @@ void explodeSS(std::string ss, Proxy &node);
void explodeTrojan(std::string trojan, Proxy &node);
void explodeQuan(const std::string &quan, Proxy &node);
void explodeStdVMess(std::string vmess, Proxy &node);
void explodeStdVless(std::string vless, Proxy &node);
void explodeStdHysteria(std::string hysteria, Proxy &node);
void explodeStdHysteria2(std::string hysteria2, Proxy &node);
void explodeShadowrocket(std::string kit, Proxy &node);
void explodeKitsunebi(std::string kit, Proxy &node);
void explodeVless(std::string vless, Proxy &node);
void explodeHysteria(std::string hysteria, Proxy &node);
void explodeHysteria2(std::string hysteria2, Proxy &node);
/// Parse a link
void explode(const std::string &link, Proxy &node);
void explodeSSD(std::string link, std::vector<Proxy> &nodes);

View File

@@ -1,6 +1,6 @@
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
#define VERSION "v0.8.1"
#define VERSION "v0.8.2"
#endif // VERSION_H_INCLUDED