mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-25 18:32:22 +00:00
Compare commits
7 Commits
383deb54a7
...
36229fc2ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36229fc2ad | ||
|
|
aa721c5b06 | ||
|
|
60d20e42c8 | ||
|
|
645361a07e | ||
|
|
9947eebbfc | ||
|
|
11bc5c7236 | ||
|
|
4b4d227603 |
@@ -8,8 +8,10 @@ WORKDIR /
|
||||
RUN set -xe && \
|
||||
apk add --no-cache --virtual .build-tools git g++ build-base linux-headers cmake python3 && \
|
||||
apk add --no-cache --virtual .build-deps curl-dev rapidjson-dev pcre2-dev yaml-cpp-dev && \
|
||||
git clone https://github.com/ftk/quickjspp --depth=1 && \
|
||||
git clone --no-checkout https://github.com/ftk/quickjspp.git && \
|
||||
cd quickjspp && \
|
||||
git fetch origin 0c00c48895919fc02da3f191a2da06addeb07f09 && \
|
||||
git checkout 0c00c48895919fc02da3f191a2da06addeb07f09 && \
|
||||
git submodule update --init && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release . && \
|
||||
make quickjs -j $THREADS && \
|
||||
|
||||
@@ -16,8 +16,10 @@ cmake -DCMAKE_BUILD_TYPE=Release -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOO
|
||||
make install -j3 > /dev/null
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ftk/quickjspp --depth=1
|
||||
git clone --no-checkout https://github.com/ftk/quickjspp.git
|
||||
cd quickjspp
|
||||
git fetch origin 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
git checkout 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make quickjs -j3 > /dev/null
|
||||
install -d /usr/lib/quickjs/
|
||||
|
||||
@@ -18,8 +18,10 @@ make -j6 > /dev/null
|
||||
sudo make install > /dev/null
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ftk/quickjspp --depth=1
|
||||
git clone --no-checkout https://github.com/ftk/quickjspp.git
|
||||
cd quickjspp
|
||||
git fetch origin 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
git checkout 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make quickjs -j6 > /dev/null
|
||||
sudo install -d /usr/local/lib/quickjs/
|
||||
|
||||
@@ -13,8 +13,10 @@ cmake -DCMAKE_BUILD_TYPE=Release -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOO
|
||||
make install -j4
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ftk/quickjspp --depth=1
|
||||
git clone --no-checkout https://github.com/ftk/quickjspp.git
|
||||
cd quickjspp
|
||||
git fetch origin 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
git checkout 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
patch quickjs/quickjs-libc.c -i ../scripts/patches/0001-quickjs-libc-add-realpath-for-Windows.patch
|
||||
cmake -G "Unix Makefiles" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
|
||||
@@ -16,8 +16,10 @@ cd rapidjson
|
||||
cp -r include/* $PREFIX/include/
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/ftk/quickjspp --depth=1
|
||||
git clone --no-checkout https://github.com/ftk/quickjspp.git
|
||||
cd quickjspp
|
||||
git fetch origin 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
git checkout 0c00c48895919fc02da3f191a2da06addeb07f09
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
make quickjs -j3
|
||||
install -d $PREFIX/lib/quickjs/
|
||||
|
||||
@@ -1088,6 +1088,8 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
|
||||
proxy += ",server-cert-fingerprint-sha256=" + x.Fingerprint;
|
||||
if (!x.ServerName.empty())
|
||||
proxy += ",sni=" + x.ServerName;
|
||||
if (!x.Ports.empty())
|
||||
proxy += ",port-hopping=" + x.Ports;
|
||||
break;
|
||||
case ProxyType::WireGuard:
|
||||
if (surge_ver < 4 && surge_ver != -3)
|
||||
@@ -1296,8 +1298,13 @@ std::string proxyToSingle(std::vector<Proxy> &nodes, int types, extra_settings &
|
||||
? "00000000-0000-0000-0000-000000000000"
|
||||
: id) + "@" + hostname + ":" + port+"?";
|
||||
if (!tls.empty()) {
|
||||
proxyStr += "&security=" + tls;
|
||||
if (!pbk.empty()) {
|
||||
proxyStr += "&security=reality";
|
||||
}else {
|
||||
proxyStr += "&security=" + tls;
|
||||
}
|
||||
}
|
||||
|
||||
if (!flow.empty()) {
|
||||
proxyStr += "&flow=" + flow;
|
||||
}
|
||||
@@ -2858,7 +2865,7 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json,
|
||||
rapidjson::Value utls(rapidjson::kObjectType);
|
||||
utls.AddMember("enabled", true, allocator);
|
||||
utls.AddMember("fingerprint", rapidjson::StringRef(x.Fingerprint.c_str()), allocator);
|
||||
proxy.AddMember("utls", utls, allocator);
|
||||
tls.AddMember("utls", utls, allocator);
|
||||
}
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
break;
|
||||
|
||||
@@ -37,14 +37,25 @@ std::map<std::string, std::string> parsedMD5;
|
||||
std::string modSSMD5 = "f7653207090ce3389115e9c88541afe0";
|
||||
|
||||
//remake from speedtestutil
|
||||
std::string removeBrackets(const std::string& input) {
|
||||
std::string result = input;
|
||||
size_t left = result.find('[');
|
||||
size_t right = result.find(']');
|
||||
|
||||
if (left != std::string::npos && right != std::string::npos && right > left) {
|
||||
result.erase(right, 1); // 删除 ']'
|
||||
result.erase(left, 1); // 删除 '['
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
void commonConstruct(Proxy &node, ProxyType type, const std::string &group, const std::string &remarks,
|
||||
const std::string &server, const std::string &port, const tribool &udp, const tribool &tfo,
|
||||
const tribool &scv, const tribool &tls13, const std::string &underlying_proxy) {
|
||||
node.Type = type;
|
||||
node.Group = group;
|
||||
node.Remark = remarks;
|
||||
node.Hostname = server;
|
||||
node.Hostname = removeBrackets(server);
|
||||
node.Port = to_int(port);
|
||||
node.UDP = udp;
|
||||
node.TCPFastOpen = tfo;
|
||||
|
||||
Reference in New Issue
Block a user