mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
fix: vmess, trojan on loon
This commit is contained in:
1 parent
75442461f4
commit
458e0a0d6e
2 files changed
+15
-1
No files matched your search
+1
-1
@@ -37,7 +37,7 @@ RUN set -xe && \
|
||||
cmake -DCMAKE_CXX_STANDARD=11 . && \
|
||||
make install -j $THREADS && \
|
||||
cd .. && \
|
||||
git clone https://github.com/asdlokj1qpi233/subconverter --depth=1 && \
|
||||
git clone https://github.com/ionull/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 && \
|
||||
|
||||
@@ -2243,6 +2243,10 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
|
||||
|
||||
proxy = "vmess," + hostname + "," + port + "," + method + ",\"" + id + "\",over-tls=" +
|
||||
(tlssecure ? "true" : "false");
|
||||
|
||||
if (!sni.empty())
|
||||
host = sni;
|
||||
|
||||
if (tlssecure)
|
||||
proxy += ",tls-name=" + host;
|
||||
switch (hash_(transproto)) {
|
||||
@@ -2306,6 +2310,16 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
|
||||
proxy = "trojan," + hostname + "," + port + ",\"" + password + "\"";
|
||||
if (!host.empty())
|
||||
proxy += ",tls-name=" + host;
|
||||
switch (hash_(transproto)) {
|
||||
case "tcp"_hash:
|
||||
proxy += ",transport=tcp";
|
||||
break;
|
||||
case "ws"_hash:
|
||||
proxy += ",transport=ws,path=" + path + ",host=" + host;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if (!scv.is_undef())
|
||||
proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false");
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user