mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-29 04:42:33 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b85906be1 | ||
|
|
03b6f02573 | ||
|
|
92db1f1f58 | ||
|
|
d68a2217fe | ||
|
|
ca6042bb8c | ||
|
|
3b7b519584 | ||
|
|
26f8f51eb5 | ||
|
|
9f8067ab11 |
98
.github/workflows/build.yml
vendored
98
.github/workflows/build.yml
vendored
@@ -62,55 +62,55 @@ jobs:
|
||||
files: subconverter_linux64.tar.gz
|
||||
draft: true
|
||||
|
||||
armv7_build:
|
||||
name: Linux armv7 Build
|
||||
runs-on: [self-hosted, linux, ARM]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
- name: Build
|
||||
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armv7-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_armv7
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_armv7.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_armv7.tar.gz
|
||||
draft: true
|
||||
|
||||
aarch64_build:
|
||||
name: Linux aarch64 Build
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
- name: Build
|
||||
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:aarch64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_aarch64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_aarch64.tar.gz
|
||||
draft: true
|
||||
# armv7_build:
|
||||
# name: Linux armv7 Build
|
||||
# runs-on: [self-hosted, linux, ARM]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Add commit id into version
|
||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
# - name: Build
|
||||
# run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armv7-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
# - name: Upload
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: subconverter_armv7
|
||||
# path: subconverter/
|
||||
# - name: Package Release
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: tar czf subconverter_armv7.tar.gz subconverter
|
||||
# - name: Draft Release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# with:
|
||||
# files: subconverter_armv7.tar.gz
|
||||
# draft: true
|
||||
#
|
||||
# aarch64_build:
|
||||
# name: Linux aarch64 Build
|
||||
# runs-on: [self-hosted, linux, ARM64]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Add commit id into version
|
||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
# - name: Build
|
||||
# run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:aarch64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
# - name: Upload
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: subconverter_aarch64
|
||||
# path: subconverter/
|
||||
# - name: Package Release
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||
# - name: Draft Release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# with:
|
||||
# files: subconverter_aarch64.tar.gz
|
||||
# draft: true
|
||||
|
||||
macos_build:
|
||||
name: macOS Build
|
||||
|
||||
281
.github/workflows/docker.yml
vendored
281
.github/workflows/docker.yml
vendored
@@ -144,149 +144,150 @@ jobs:
|
||||
name: digest_386
|
||||
path: /tmp/digest.txt
|
||||
|
||||
armv7_build:
|
||||
name: Build ARMv7 Image
|
||||
runs-on: [self-hosted, linux, ARM]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_armv7
|
||||
path: /tmp/digest.txt
|
||||
|
||||
arm64_build:
|
||||
name: Build ARM64 Image
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_arm64
|
||||
path: /tmp/digest.txt
|
||||
# armv7_build:
|
||||
# name: Build ARMv7 Image
|
||||
# runs-on: [self-hosted, linux, ARM]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_armv7
|
||||
# path: /tmp/digest.txt
|
||||
#
|
||||
# arm64_build:
|
||||
# name: Build ARM64 Image
|
||||
# runs-on: [self-hosted, linux, ARM64]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_arm64
|
||||
# path: /tmp/digest.txt
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
||||
# needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
||||
needs: [amd64_build, x86_build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
# subconverter-docker
|
||||
|
||||
This is a minimized image to run https://github.com/tindy2013/subconverter.
|
||||
|
||||
For running this docker, simply use the following commands:
|
||||
```bash
|
||||
# run the container detached, forward internal port 25500 to host port 25500
|
||||
docker run -d --restart=always -p 25500:25500 tindy2013/subconverter:latest
|
||||
docker run -d --restart=always -p 25500:25500 asdlokj1qpi23/subconverter:latest
|
||||
# then check its status
|
||||
curl http://localhost:25500/version
|
||||
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||
@@ -16,7 +14,7 @@ Or run in docker-compose:
|
||||
version: '3'
|
||||
services:
|
||||
subconverter:
|
||||
image: tindy2013/subconverter:latest
|
||||
image: asdlokj1qpi23/subconverter:latest
|
||||
container_name: subconverter
|
||||
ports:
|
||||
- "15051:25500"
|
||||
|
||||
40
README.md
40
README.md
@@ -2,23 +2,46 @@
|
||||
|
||||
Utility to convert between various proxy subscription formats.
|
||||
|
||||
[](https://github.com/tindy2013/subconverter/actions)
|
||||
[](https://github.com/tindy2013/subconverter/tags)
|
||||
[](https://github.com/tindy2013/subconverter/releases)
|
||||
[](https://github.com/tindy2013/subconverter/blob/master/LICENSE)
|
||||
[](https://github.com/asdlokj1qpi23/subconverter/actions)
|
||||
[](https://github.com/asdlokj1qpi23/subconverter/tags)
|
||||
[](https://github.com/asdlokj1qpi23/subconverter/releases)
|
||||
[](https://github.com/tindy2013/subconverter/blob/master/LICENSE)
|
||||
|
||||
[Docker README](https://github.com/tindy2013/subconverter/blob/master/README-docker.md)
|
||||
[Docker README](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-docker.md)
|
||||
|
||||
[中文文档](https://github.com/tindy2013/subconverter/blob/master/README-cn.md)
|
||||
[中文文档](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-cn.md)
|
||||
|
||||
- [subconverter](#subconverter)
|
||||
- [Docker](#docker)
|
||||
- [Supported Types](#supported-types)
|
||||
- [Quick Usage](#quick-usage)
|
||||
- [Access Interface](#access-interface)
|
||||
- [Description](#description)
|
||||
- [Advanced Usage](#advanced-usage)
|
||||
- [Auto Upload](#auto-upload)
|
||||
|
||||
## Docker
|
||||
|
||||
For running this docker, simply use the following commands:
|
||||
```bash
|
||||
# run the container detached, forward internal port 25500 to host port 25500
|
||||
docker run -d --restart=always -p 25500:25500 asdlokj1qpi23/subconverter:latest
|
||||
# then check its status
|
||||
curl http://localhost:25500/version
|
||||
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||
```
|
||||
Or run in docker-compose:
|
||||
```yaml
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
subconverter:
|
||||
image: asdlokj1qpi23/subconverter:latest
|
||||
container_name: subconverter
|
||||
ports:
|
||||
- "15051:25500"
|
||||
restart: always
|
||||
```
|
||||
## Supported Types
|
||||
|
||||
| Type | As Source | As Target | Target Name |
|
||||
@@ -95,7 +118,7 @@ Finally subscribe this link in Clash and you are done!
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
Please refer to [中文文档](https://github.com/tindy2013/subconverter/blob/master/README-cn.md#%E8%BF%9B%E9%98%B6%E7%94%A8%E6%B3%95).
|
||||
Please refer to [中文文档](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-cn.md#%E8%BF%9B%E9%98%B6%E7%94%A8%E6%B3%95).
|
||||
|
||||
## Auto Upload
|
||||
|
||||
@@ -110,3 +133,6 @@ Example:
|
||||
;uncomment the following line and enter your token to enable upload function
|
||||
token = xxxxxxxxxxxxxxxxxxxxxxxx(Your Personal Access Token)
|
||||
```
|
||||
## Thanks
|
||||
[tindy2013](https://github.com/tindy2013)
|
||||
[https://github.com/tindy2013/subconverter](https://github.com/tindy2013/subconverter)
|
||||
@@ -492,6 +492,9 @@ proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGroupCo
|
||||
if (!x.ShortId.empty()) {
|
||||
singleproxy["reality-opts"]["short-id"] = x.ShortId;
|
||||
}
|
||||
if (!x.PublicKey.empty() || x.Flow == "xtls-rprx-vision") {
|
||||
singleproxy["client-fingerprint"] = "chrome";
|
||||
}
|
||||
switch (hash_(x.TransferProtocol)) {
|
||||
case "tcp"_hash:
|
||||
break;
|
||||
@@ -2109,6 +2112,15 @@ static rapidjson::Value stringArrayToJsonArray(const std::string &array, const s
|
||||
return result;
|
||||
}
|
||||
|
||||
bool isNumeric(const std::string &str) {
|
||||
for (char c: str) {
|
||||
if (!std::isdigit(static_cast<unsigned char>(c))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector<RulesetContent> &ruleset_content_array,
|
||||
const ProxyGroupConfigs &extra_proxy_group, extra_settings &ext) {
|
||||
@@ -2117,6 +2129,7 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
rapidjson::Value outbounds(rapidjson::kArrayType), route(rapidjson::kArrayType);
|
||||
std::vector<Proxy> nodelist;
|
||||
string_array remarks_list;
|
||||
std::string search = " Mbps";
|
||||
|
||||
if (!ext.nodelist) {
|
||||
auto direct = buildObject(allocator, "type", "direct", "tag", "DIRECT");
|
||||
@@ -2154,16 +2167,16 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ProxyType::ShadowsocksR: {
|
||||
addSingBoxCommonMembers(proxy, x, "shadowsocksr", allocator);
|
||||
proxy.AddMember("method", rapidjson::StringRef(x.EncryptMethod.c_str()), allocator);
|
||||
proxy.AddMember("password", rapidjson::StringRef(x.Password.c_str()), allocator);
|
||||
proxy.AddMember("protocol", rapidjson::StringRef(x.Protocol.c_str()), allocator);
|
||||
proxy.AddMember("protocol_param", rapidjson::StringRef(x.ProtocolParam.c_str()), allocator);
|
||||
proxy.AddMember("obfs", rapidjson::StringRef(x.OBFS.c_str()), allocator);
|
||||
proxy.AddMember("obfs_param", rapidjson::StringRef(x.OBFSParam.c_str()), allocator);
|
||||
break;
|
||||
}
|
||||
// case ProxyType::ShadowsocksR: {
|
||||
// addSingBoxCommonMembers(proxy, x, "shadowsocksr", allocator);
|
||||
// proxy.AddMember("method", rapidjson::StringRef(x.EncryptMethod.c_str()), allocator);
|
||||
// proxy.AddMember("password", rapidjson::StringRef(x.Password.c_str()), allocator);
|
||||
// proxy.AddMember("protocol", rapidjson::StringRef(x.Protocol.c_str()), allocator);
|
||||
// proxy.AddMember("protocol_param", rapidjson::StringRef(x.ProtocolParam.c_str()), allocator);
|
||||
// proxy.AddMember("obfs", rapidjson::StringRef(x.OBFS.c_str()), allocator);
|
||||
// proxy.AddMember("obfs_param", rapidjson::StringRef(x.OBFSParam.c_str()), allocator);
|
||||
// break;
|
||||
// }
|
||||
case ProxyType::VMess: {
|
||||
addSingBoxCommonMembers(proxy, x, "vmess", allocator);
|
||||
proxy.AddMember("uuid", rapidjson::StringRef(x.UserId.c_str()), allocator);
|
||||
@@ -2175,49 +2188,51 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
proxy.AddMember("transport", transport, allocator);
|
||||
break;
|
||||
}
|
||||
// TODO VLESS后续支持
|
||||
case ProxyType::VLESS: {
|
||||
addSingBoxCommonMembers(proxy, x, "vmess", allocator);
|
||||
addSingBoxCommonMembers(proxy, x, "vless", allocator);
|
||||
proxy.AddMember("uuid", rapidjson::StringRef(x.UserId.c_str()), allocator);
|
||||
if (xudp && udp)
|
||||
proxy.AddMember("packet_encoding", rapidjson::StringRef("xudp"), allocator);
|
||||
if (!x.Host.empty())
|
||||
proxy.AddMember("server", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
if (!x.Flow.empty())
|
||||
proxy.AddMember("flow", rapidjson::StringRef(x.Flow.c_str()), allocator);
|
||||
rapidjson::Value transport(rapidjson::kObjectType);
|
||||
rapidjson::Value vlesstransport(rapidjson::kObjectType);
|
||||
rapidjson::Value vlessheaders(rapidjson::kObjectType);
|
||||
switch (hash_(x.TransferProtocol)) {
|
||||
case "tcp"_hash:
|
||||
proxy.AddMember("network", rapidjson::StringRef("ws"), allocator);
|
||||
break;
|
||||
case "ws"_hash:
|
||||
transport.AddMember("type", rapidjson::StringRef("ws"), allocator);
|
||||
transport.AddMember("host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
transport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
addHeaders(transport, x, allocator);
|
||||
proxy.AddMember("transport", transport, allocator);
|
||||
if (x.Path.empty())
|
||||
vlesstransport.AddMember("path", "/", allocator);
|
||||
else
|
||||
vlesstransport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
if (!x.Host.empty())
|
||||
vlessheaders.AddMember("Host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
if (!x.Edge.empty())
|
||||
vlessheaders.AddMember("Edge", rapidjson::StringRef(x.Edge.c_str()), allocator);
|
||||
vlesstransport.AddMember("type", rapidjson::StringRef("ws"), allocator);
|
||||
vlesstransport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
addHeaders(vlesstransport, x, allocator);
|
||||
proxy.AddMember("transport", vlesstransport, allocator);
|
||||
break;
|
||||
case "http"_hash:
|
||||
transport.AddMember("type", rapidjson::StringRef("http"), allocator);
|
||||
transport.AddMember("host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
transport.AddMember("method", rapidjson::StringRef("GET"), allocator);
|
||||
transport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
addHeaders(transport, x, allocator);
|
||||
proxy.AddMember("transport", transport, allocator);
|
||||
vlesstransport.AddMember("type", rapidjson::StringRef("http"), allocator);
|
||||
vlesstransport.AddMember("host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
vlesstransport.AddMember("method", rapidjson::StringRef("GET"), allocator);
|
||||
vlesstransport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
addHeaders(vlesstransport, x, allocator);
|
||||
proxy.AddMember("transport", vlesstransport, allocator);
|
||||
break;
|
||||
case "h2"_hash:
|
||||
transport.AddMember("type", rapidjson::StringRef("httpupgrade"), allocator);
|
||||
transport.AddMember("host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
transport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
proxy.AddMember("transport", transport, allocator);
|
||||
vlesstransport.AddMember("type", rapidjson::StringRef("httpupgrade"), allocator);
|
||||
vlesstransport.AddMember("host", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
vlesstransport.AddMember("path", rapidjson::StringRef(x.Path.c_str()), allocator);
|
||||
proxy.AddMember("transport", vlesstransport, allocator);
|
||||
break;
|
||||
case "grpc"_hash:
|
||||
transport.AddMember("type", rapidjson::StringRef("grpc"), allocator);
|
||||
transport.AddMember("service_name", rapidjson::StringRef(x.GRPCServiceName.c_str()), allocator);
|
||||
if (!x.GRPCMode.empty()) {
|
||||
transport.AddMember("permit_without_stream", rapidjson::StringRef("true"), allocator);
|
||||
}
|
||||
proxy.AddMember("transport", transport, allocator);
|
||||
vlesstransport.AddMember("type", rapidjson::StringRef("grpc"), allocator);
|
||||
vlesstransport.AddMember("service_name", rapidjson::StringRef(x.GRPCServiceName.c_str()),
|
||||
allocator);
|
||||
proxy.AddMember("transport", vlesstransport, allocator);
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
@@ -2236,13 +2251,15 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
case ProxyType::WireGuard: {
|
||||
proxy.AddMember("type", "wireguard", allocator);
|
||||
proxy.AddMember("tag", rapidjson::StringRef(x.Remark.c_str()), allocator);
|
||||
proxy.AddMember("inet4_bind_address", rapidjson::StringRef(x.SelfIP.c_str()), allocator);
|
||||
rapidjson::Value addresses(rapidjson::kArrayType);
|
||||
addresses.PushBack(rapidjson::StringRef(x.SelfIP.c_str()), allocator);
|
||||
if (!x.SelfIPv6.empty())
|
||||
addresses.PushBack(rapidjson::StringRef(x.SelfIPv6.c_str()), allocator);
|
||||
addresses.PushBack(rapidjson::StringRef(x.SelfIP.append("/32").c_str()), allocator);
|
||||
// if (!x.SelfIPv6.empty())
|
||||
// addresses.PushBack(rapidjson::StringRef(x.SelfIPv6.c_str()), allocator);
|
||||
proxy.AddMember("local_address", addresses, allocator);
|
||||
if (!x.SelfIPv6.empty())
|
||||
proxy.AddMember("inet6_bind_address", rapidjson::StringRef(x.SelfIPv6.c_str()), allocator);
|
||||
proxy.AddMember("private_key", rapidjson::StringRef(x.PrivateKey.c_str()), allocator);
|
||||
|
||||
rapidjson::Value peer(rapidjson::kObjectType);
|
||||
peer.AddMember("server", rapidjson::StringRef(x.Hostname.c_str()), allocator);
|
||||
peer.AddMember("server_port", x.Port, allocator);
|
||||
@@ -2283,19 +2300,41 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
case ProxyType::Hysteria: {
|
||||
addSingBoxCommonMembers(proxy, x, "hysteria", allocator);
|
||||
proxy.AddMember("auth_str", rapidjson::StringRef(x.Auth.c_str()), allocator);
|
||||
proxy.AddMember("up", rapidjson::StringRef(x.UpMbps.c_str()), allocator);
|
||||
proxy.AddMember("down", rapidjson::StringRef(x.DownMbps.c_str()), allocator);
|
||||
rapidjson::Value tls(rapidjson::kObjectType);
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
if (!tfo.is_undef())
|
||||
proxy.AddMember("tcp_fast_open",
|
||||
rapidjson::StringRef(std::string(tfo.get() ? "true" : "false").c_str()), allocator);
|
||||
if (isNumeric(x.UpMbps)) {
|
||||
proxy.AddMember("up_mbps", std::stoi(x.UpMbps), allocator);
|
||||
// x.UpMbps.append(search);
|
||||
// proxy.AddMember("up", rapidjson::StringRef(x.UpMbps.c_str()), allocator);
|
||||
} else {
|
||||
// proxy.AddMember("up", rapidjson::StringRef(x.UpMbps.c_str()), allocator);
|
||||
size_t pos = x.UpMbps.find(search);
|
||||
if (pos != std::string::npos) {
|
||||
x.UpMbps.replace(pos, search.length(), "");
|
||||
}
|
||||
proxy.AddMember("up_mbps", std::stoi(x.UpMbps), allocator);
|
||||
}
|
||||
if (isNumeric(x.DownMbps)) {
|
||||
proxy.AddMember("down_mbps", std::stoi(x.DownMbps), allocator);
|
||||
// x.DownMbps.append(search);
|
||||
// proxy.AddMember("down", rapidjson::StringRef(x.DownMbps.c_str()), allocator);
|
||||
} else {
|
||||
// proxy.AddMember("down", rapidjson::StringRef(x.DownMbps.c_str()), allocator);
|
||||
size_t pos = x.DownMbps.find(search);
|
||||
if (pos != std::string::npos) {
|
||||
x.DownMbps.replace(pos, search.length(), "");
|
||||
}
|
||||
proxy.AddMember("down_mbps", std::stoi(x.DownMbps), allocator);
|
||||
}
|
||||
if (!x.TLSSecure) {
|
||||
rapidjson::Value tls(rapidjson::kObjectType);
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
if (!x.Alpn.empty()) {
|
||||
auto alpns = stringArrayToJsonArray(x.Alpn, ",", allocator);
|
||||
tls.AddMember("alpn", alpns, allocator);
|
||||
}
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
}
|
||||
if (!x.FakeType.empty())
|
||||
proxy.AddMember("network", rapidjson::StringRef(x.FakeType.c_str()), allocator);
|
||||
if (!x.Alpn.empty())
|
||||
proxy.AddMember("tls", rapidjson::StringRef(
|
||||
std::string(R"({ "enabled": true,"alpn": [)" + x.Alpn + "],}").c_str()), allocator);
|
||||
if (!x.OBFSParam.empty())
|
||||
proxy.AddMember("obfs", rapidjson::StringRef(x.OBFSParam.c_str()), allocator);
|
||||
break;
|
||||
@@ -2303,16 +2342,33 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
case ProxyType::Hysteria2: {
|
||||
addSingBoxCommonMembers(proxy, x, "hysteria2", allocator);
|
||||
proxy.AddMember("password", rapidjson::StringRef(x.Password.c_str()), allocator);
|
||||
rapidjson::Value tls(rapidjson::kObjectType);
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
if (!x.UpMbps.empty())
|
||||
proxy.AddMember("up_mbps", rapidjson::StringRef(x.UpMbps.c_str()), allocator);
|
||||
if (!x.DownMbps.empty())
|
||||
proxy.AddMember("down_mbps", rapidjson::StringRef(x.DownMbps.c_str()), allocator);
|
||||
if (!x.Alpn.empty())
|
||||
proxy.AddMember("tls", rapidjson::StringRef(
|
||||
std::string(R"({ "enabled": true,"alpn": [)" + x.Alpn + "],}").c_str()), allocator);
|
||||
if (!x.TLSSecure) {
|
||||
rapidjson::Value tls(rapidjson::kObjectType);
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
if (!x.Alpn.empty()) {
|
||||
auto alpns = stringArrayToJsonArray(x.Alpn, ",", allocator);
|
||||
tls.AddMember("alpn", alpns, allocator);
|
||||
}
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
}
|
||||
if (!x.UpMbps.empty()) {
|
||||
if (!isNumeric(x.UpMbps)) {
|
||||
size_t pos = x.UpMbps.find(search);
|
||||
if (pos != std::string::npos) {
|
||||
x.UpMbps.replace(pos, search.length(), "");
|
||||
}
|
||||
}
|
||||
proxy.AddMember("up_mbps", std::stoi(x.UpMbps), allocator);
|
||||
}
|
||||
if (!x.DownMbps.empty()) {
|
||||
if (!isNumeric(x.DownMbps)) {
|
||||
size_t pos = x.DownMbps.find(search);
|
||||
if (pos != std::string::npos) {
|
||||
x.DownMbps.replace(pos, search.length(), "");
|
||||
}
|
||||
}
|
||||
proxy.AddMember("down_mbps", std::stoi(x.DownMbps), allocator);
|
||||
}
|
||||
if (!x.OBFSParam.empty()) {
|
||||
if (!x.OBFSPassword.empty()) {
|
||||
proxy.AddMember("obfs", rapidjson::StringRef(std::string(
|
||||
@@ -2334,19 +2390,28 @@ proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::vector
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
if (!x.ServerName.empty())
|
||||
tls.AddMember("server_name", rapidjson::StringRef(x.ServerName.c_str()), allocator);
|
||||
if (!x.Alpn.empty())
|
||||
tls.AddMember("alpn", rapidjson::StringRef(("[" + x.Alpn + "]").c_str()), allocator);
|
||||
if (!x.Alpn.empty()) {
|
||||
auto alpns = stringArrayToJsonArray(x.Alpn, ",", allocator);
|
||||
tls.AddMember("alpn", alpns, allocator);
|
||||
}
|
||||
tls.AddMember("insecure", buildBooleanValue(scv), allocator);
|
||||
if (x.Type == ProxyType::VLESS) {
|
||||
rapidjson::Value reality(rapidjson::kObjectType);
|
||||
if (!x.PublicKey.empty() || !x.ShortId.empty()) {
|
||||
reality.AddMember("enabled", rapidjson::StringRef("false"), allocator);
|
||||
if (!x.Host.empty()) {
|
||||
tls.EraseMember("server_name");
|
||||
tls.AddMember("server_name", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
}
|
||||
rapidjson::Value utls(rapidjson::kObjectType);
|
||||
utls.AddMember("enabled", true, allocator);
|
||||
utls.AddMember("fingerprint", rapidjson::StringRef("chrome"), allocator);
|
||||
tls.AddMember("utls", utls, allocator);
|
||||
reality.AddMember("enabled", true, allocator);
|
||||
if (!x.PublicKey.empty()) {
|
||||
reality.AddMember("public_key", rapidjson::StringRef("false"), allocator);
|
||||
}
|
||||
if (!x.ShortId.empty()) {
|
||||
reality.AddMember("short_id", rapidjson::StringRef(("[" + x.ShortId + "]").c_str()), allocator);
|
||||
reality.AddMember("public_key", rapidjson::StringRef(x.PublicKey.c_str()), allocator);
|
||||
}
|
||||
auto shortIds = stringArrayToJsonArray(x.Alpn, ",", allocator);
|
||||
reality.AddMember("short_id", shortIds, allocator);
|
||||
tls.AddMember("reality", reality, allocator);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -78,6 +78,8 @@ struct Proxy {
|
||||
uint16_t AlterId = 0;
|
||||
String TransferProtocol;
|
||||
String FakeType;
|
||||
String AuthStr;
|
||||
|
||||
bool TLSSecure = false;
|
||||
|
||||
String Host;
|
||||
|
||||
@@ -156,7 +156,7 @@ void wireguardConstruct(Proxy &node, const std::string &group, const std::string
|
||||
}
|
||||
|
||||
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 &port, const std::string &type, const std::string &auth,const std::string &auth_str,
|
||||
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 tfo, tribool scv,
|
||||
tribool tls13) {
|
||||
@@ -169,6 +169,7 @@ void hysteriaConstruct(Proxy &node, const std::string &group, const std::string
|
||||
node.OBFSParam = obfsParam;
|
||||
node.Insecure = insecure;
|
||||
node.FakeType = type;
|
||||
node.AuthStr = auth_str;
|
||||
}
|
||||
|
||||
|
||||
@@ -1039,7 +1040,7 @@ void explodeNetch(std::string netch, Proxy &node) {
|
||||
}
|
||||
|
||||
void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
|
||||
std::string proxytype, ps, server, port, cipher, group, password, tempPassword; //common
|
||||
std::string proxytype, ps, server, port, cipher, group, password = "", tempPassword; //common
|
||||
std::string type = "none", id, aid = "0", net = "tcp", path, host, edge, tls, sni; //vmess
|
||||
std::string fp = "chrome", pbk, sid; //vless
|
||||
std::string plugin, pluginopts, pluginopts_mode, pluginopts_host, pluginopts_mux; //ss
|
||||
@@ -1304,6 +1305,12 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
|
||||
case "hysteria"_hash:
|
||||
group = HYSTERIA_DEFAULT_GROUP;
|
||||
singleproxy["auth_str"] >> auth;
|
||||
if (auth.empty()) {
|
||||
singleproxy["auth-str"] >> auth;
|
||||
if (auth.empty()) {
|
||||
singleproxy["password"] >> auth;
|
||||
}
|
||||
}
|
||||
singleproxy["up"] >> up;
|
||||
singleproxy["down"] >> down;
|
||||
singleproxy["obfs"] >> obfsParam;
|
||||
@@ -1312,13 +1319,14 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
|
||||
singleproxy["alpn"][0] >> alpn;
|
||||
singleproxy["protocol"] >> insecure;
|
||||
|
||||
hysteriaConstruct(node, group, ps, server, port, type, auth, host, up, down, alpn, obfsParam, insecure,
|
||||
hysteriaConstruct(node, group, ps, server, port, type, auth,"", host, up, down, alpn, obfsParam, insecure,
|
||||
udp, tfo, scv);
|
||||
break;
|
||||
case "hysteria2"_hash:
|
||||
group = HYSTERIA2_DEFAULT_GROUP;
|
||||
singleproxy["password"] >>= password;
|
||||
singleproxy["auth"] >>= password;
|
||||
if (password.empty())
|
||||
singleproxy["auth"] >>= password;
|
||||
singleproxy["up"] >>= up;
|
||||
singleproxy["down"] >>= down;
|
||||
singleproxy["obfs"] >>= obfsParam;
|
||||
@@ -1381,7 +1389,7 @@ void explodeStdVMess(std::string vmess, Proxy &node) {
|
||||
|
||||
|
||||
void explodeStdHysteria(std::string hysteria, Proxy &node) {
|
||||
std::string add, port, type, auth, host, insecure, up, down, alpn, obfsParam, remarks;
|
||||
std::string add, port, type, auth, host, insecure, up, down, alpn, obfsParam, remarks,auth_str;
|
||||
std::string addition;
|
||||
hysteria = hysteria.substr(11);
|
||||
string_size pos;
|
||||
@@ -1396,17 +1404,17 @@ void explodeStdHysteria(std::string hysteria, Proxy &node) {
|
||||
return;
|
||||
type = getUrlArg(addition, "protocol");
|
||||
auth = getUrlArg(addition, "auth");
|
||||
auth_str = getUrlArg(addition, "auth_str");
|
||||
host = getUrlArg(addition, "peer");
|
||||
insecure = getUrlArg(addition, "insecure");
|
||||
up = getUrlArg(addition, "upmbps");
|
||||
down = getUrlArg(addition, "downmbps");
|
||||
alpn = getUrlArg(addition, "alpn");
|
||||
obfsParam = getUrlArg(addition, "obfsParam");
|
||||
|
||||
if (remarks.empty())
|
||||
remarks = add + ":" + port;
|
||||
|
||||
hysteriaConstruct(node, HYSTERIA_DEFAULT_GROUP, remarks, add, port, type, auth, host, up, down, alpn, obfsParam,
|
||||
hysteriaConstruct(node, HYSTERIA_DEFAULT_GROUP, remarks, add, port, type, auth,auth_str, host, up, down, alpn, obfsParam,
|
||||
insecure);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ 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 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 &auth_str, 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());
|
||||
|
||||
Reference in New Issue
Block a user