Compare commits

...

65 Commits

Author SHA1 Message Date
asdlokj1qpi23
4d0ed9a105 v0.9.5 2024-06-27 15:16:27 +08:00
asdlokj1qpi23
63eee92062 Edit docs. 2024-06-25 16:38:43 +08:00
asdlokj1qpi23
b9b864cf51 Hy2 supports obtaining port hopping parameters from a link. 2024-06-19 14:56:59 +08:00
asdlokj1qpi23
bdd6bbf67a Fix Issue.Add default value.(#22) 2024-06-19 10:41:55 +08:00
asdlokj1qpi23
8a18d3564b Fix Issue.(#22) 2024-06-17 11:28:12 +08:00
asdlokj1qpi23
2ee7c3aa04 Fix Actions Issue.(#22) 2024-06-14 09:30:37 +08:00
asdlokj1qpi23
598f6ac414 Fix Bug.(#22) 2024-06-13 17:30:34 +08:00
asdlokj1qpi23
6c296bfbf2 Add Hy2 for Loon.(#22) 2024-06-13 17:29:22 +08:00
asdlokj1qpi23
43fc751a2d fix bugs.(#16) 2024-05-22 09:41:37 +08:00
asdlokj1qpi23
99c1ef8b1a Support vless for quanx.(#16) 2024-05-17 09:59:48 +08:00
asdlokj1qpi23
53b561bce7 Fix github actions. 2024-05-09 16:50:20 +08:00
asdlokj1qpi23
469feaf0f5 Fix github actions. 2024-05-09 16:34:20 +08:00
asdlokj1qpi23
0895a16876 Fix the bug related to certificate validation in the Hysteria2 protocol.(#17) 2024-05-09 15:34:06 +08:00
asdlokj1qpi23
a8292b1fc6 Add support for Hysteria2 ports. 2024-03-13 18:12:36 +08:00
asdlokj1qpi23
1ff018c47b update docker actions 2024-03-13 10:23:15 +08:00
asdlokj1qpi23
6227eb4e7d update docker actions 2024-03-13 09:34:17 +08:00
asdlokj1qpi23
54c8e65c70 update docker actions 2024-03-13 09:25:03 +08:00
asdlokj1qpi23
b90e63b506 fix string_icase_map.(#10) 2024-03-12 10:36:33 +08:00
asdlokj1qpi23
185e3893bf To add custom certificate configuration for HY2 protocol.(#7) 2024-01-29 19:20:59 +08:00
asdlokj1qpi23
5a4049af89 When adding Surge as a target, support for hysteria2.(#6) 2024-01-24 14:45:17 +08:00
asdlokj1qpi23
c842defea8 Fix the conversion of TLS-related issues when Singbox is used as the source. Fix the issue of missing SNI in Trojan.(#4) 2024-01-03 09:59:25 +08:00
asdlokj1qpi23
e26eaf0bf5 Fix the issue of missing sni parameters in vless, hysteria, and hysteria2. Fix the problem of dirty data during Singbox conversion. (#4) 2024-01-02 17:19:13 +08:00
asdlokj1qpi23
766bdcd6e1 Fix the issue of incorrect conversion of VLESS reality in Singbox as the source. Fix the issue of missing SS nodes with the obfs type when converting to Singbox. (#4) 2024-01-02 11:36:00 +08:00
asdlokj1qpi23
897dc5ed43 fix singbox parser bug.(#4) 2023-12-30 19:18:30 +08:00
asdlokj1qpi23
7bd6670448 change README.md 2023-12-29 19:31:47 +08:00
asdlokj1qpi23
7af3bf1794 Include Singbox as a source.(#4) 2023-12-29 18:59:20 +08:00
asdlokj1qpi23
359d9794a8 Add singbox parser vmess.Change README.md 2023-12-28 15:39:27 +08:00
asdlokj1qpi23
089f782177 Add singbox parser function. 2023-12-28 14:10:31 +08:00
asdlokj1qpi23
75023b028e fix stash vmess uuid issue. 2023-12-26 11:06:01 +08:00
asdlokj1qpi23
322924f24a fix actions issues 2023-12-25 12:44:00 +08:00
asdlokj1qpi23
04a2c24904 fix actions issues 2023-12-25 12:38:55 +08:00
asdlokj1qpi23
e80ce5833c add arm test 2023-12-25 11:33:22 +08:00
asdlokj1qpi23
31ba5373f0 add arm test 2023-12-25 11:10:37 +08:00
asdlokj1qpi23
d3801b7951 add arm test 2023-12-25 11:09:32 +08:00
asdlokj1qpi23
31775a91a8 add arm test 2023-12-25 11:01:34 +08:00
asdlokj1qpi23
af4dd857a8 Revert "fix vless short_id issue.(#1)"
This reverts commit 686f6b3517.
2023-12-25 11:00:27 +08:00
asdlokj1qpi23
686f6b3517 fix vless short_id issue.(#1) 2023-12-25 11:00:02 +08:00
asdlokj1qpi23
ebad0e96f7 fix vless short_id issue.(#1) 2023-12-25 10:51:21 +08:00
asdlokj1qpi23
927c828a27 Hy1 add ports support for clash export. 2023-12-25 10:22:33 +08:00
asdlokj1qpi23
13a372511b Hy1 add ports support. 2023-12-25 10:19:50 +08:00
asdlokj1qpi23
119df56f35 clean useless code. 2023-12-22 10:32:09 +08:00
asdlokj1qpi23
0672bd11cd Add auth-str for export Clash. 2023-12-22 10:23:44 +08:00
asdlokj1qpi23
f4de5097a6 remove clash api 2023-12-22 09:48:22 +08:00
asdlokj1qpi23
cb36b431ce Update singbox.json for clash API 2023-12-22 09:47:04 +08:00
asdlokj1qpi23
d5b3f920b8 fix path bug for vless websocket 2023-12-22 09:34:50 +08:00
asdlokj1qpi23
69e35d6657 add insecure for hy 2023-12-21 20:24:12 +08:00
asdlokj1qpi23
936ff011e9 add insecure for hy2 2023-12-21 20:19:57 +08:00
asdlokj1qpi23
0cda1641d3 update version.h 2023-12-21 19:50:10 +08:00
asdlokj1qpi23
5b85906be1 Fixing WireGuard, hy and hy2 Protocol export Issues. 2023-12-21 19:27:31 +08:00
asdlokj1qpi23
03b6f02573 Change readme and workflow. 2023-12-21 15:52:39 +08:00
asdlokj1qpi23
92db1f1f58 Change readme and workflow. 2023-12-21 15:50:13 +08:00
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
17 changed files with 4339 additions and 3634 deletions

View File

@@ -1,7 +1,6 @@
name: GitHub CI
on:
push:
branches: [ master ]
tags:
- '**'
workflow_dispatch:
@@ -64,12 +63,14 @@ jobs:
armv7_build:
name: Linux armv7 Build
runs-on: [self-hosted, linux, ARM]
runs-on: ubuntu-latest
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: Set up QEMU
uses: docker/setup-qemu-action@v2
- 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
@@ -89,12 +90,14 @@ jobs:
aarch64_build:
name: Linux aarch64 Build
runs-on: [self-hosted, linux, ARM64]
runs-on: ubuntu-latest
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: Set up QEMU
uses: docker/setup-qemu-action@v2
- 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

View File

@@ -1,335 +1,130 @@
name: Publish Docker Image
on:
on:
push:
branches: [ master ]
tags:
- '**'
concurrency:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
REGISTRY_IMAGE: asdlokj1qpi23/subconverter
jobs:
amd64_build:
name: Build AMD64 Image
runs-on: ubuntu-latest
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/amd64
context: scripts/
tags: tindy2013/subconverter:latest
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
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/amd64
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
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_amd64
path: /tmp/digest.txt
x86_build:
name: Build x86 Image
runs-on: ubuntu-latest
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/386
context: scripts/
tags: tindy2013/subconverter:latest
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
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/386
context: scripts/
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
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_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: tindy2013/subconverter:latest
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: tindy2013/subconverter:${{steps.version.outputs.result}}
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: tindy2013/subconverter:latest
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: tindy2013/subconverter:${{steps.version.outputs.result}}
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]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: linux/amd64
os: ubuntu-latest
- platform: linux/386
os: ubuntu-latest
- platform: linux/arm/v7
os: ubuntu-latest
- platform: linux/arm64
os: ubuntu-latest
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.platform }} Image
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout base
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 1
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
path: /tmp/images/
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Docker login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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: Merge and push manifest on master branch
- name: Get commit SHA
if: github.ref == 'refs/heads/master'
run: python scripts/merge_manifest.py
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Merge and push manifest on release
if: startsWith(github.ref, 'refs/tags/')
run: python scripts/merge_manifest.py ${{steps.version.outputs.result}}
- name: Build and export
id: build
uses: docker/build-push-action@v5
with:
platforms: ${{ matrix.platform }}
context: scripts/
labels: ${{ steps.meta.outputs.labels }}
build-args: |
SHA=${{ steps.vars.outputs.sha_short }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
rm -rf /tmp/digests
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: digest-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
name: Merge
needs: build
runs-on: ubuntu-latest
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digest-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

View File

@@ -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"

View File

@@ -2,42 +2,67 @@
Utility to convert between various proxy subscription formats.
[![Build Status](https://github.com/tindy2013/subconverter/actions/workflows/build.yml/badge.svg)](https://github.com/tindy2013/subconverter/actions)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/tindy2013/subconverter.svg)](https://github.com/tindy2013/subconverter/tags)
[![GitHub release](https://img.shields.io/github/release/tindy2013/subconverter.svg)](https://github.com/tindy2013/subconverter/releases)
[![GitHub license](https://img.shields.io/github/license/tindy2013/subconverter.svg)](https://github.com/tindy2013/subconverter/blob/master/LICENSE)
[![Build Status](https://github.com/asdlokj1qpi23/subconverter/actions/workflows/docker.yml/badge.svg)](https://github.com/asdlokj1qpi23/subconverter/actions)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/asdlokj1qpi23/subconverter.svg)](https://github.com/asdlokj1qpi23/subconverter/tags)
[![GitHub release](https://img.shields.io/github/release/asdlokj1qpi23/subconverter.svg)](https://github.com/asdlokj1qpi23/subconverter/releases)
[![GitHub license](https://img.shields.io/github/license/asdlokj1qpi23/subconverter.svg)](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 |
| ------------ | :--------: | :----------: | ----------- |
| 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 |
| Surge 5 | ✓ | ✓ | surge&ver=5 |
| V2Ray | ✓ | | v2ray |
| Telegram-liked HTTP/Socks 5 links | ✓ | × | Only as source |
| Singbox | ✓ | ✓ | singbox |
Notice:
@@ -95,7 +120,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 +135,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)

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)]

View File

@@ -13,8 +13,8 @@ dest=base/config/
keep_tree=false
[DivineEngine]
url=https://github.com/DivineEngine/Profiles
checkout=f4d75f7d48a3f42129e030bef751d4d22bca02da
url=https://github.com/asdlokj1qpi23/DivineEngine.git
checkout=e5043a1cee1678254b424267bdcfccbcb574bad6
match=Surge/Ruleset/**
[NobyDa]

View File

@@ -0,0 +1,23 @@
[ACL4SSR]
name=ACL4SSR
url=https://github.com/ACL4SSR/ACL4SSR
checkout=1dc5c92b0c8ceaaecbc66530c309961f53e52c8c
match=Clash/*.list|Clash/Ruleset/**
[ACL4SSR_config]
name=ACL4SSR
url=https://github.com/ACL4SSR/ACL4SSR
checkout=1dc5c92b0c8ceaaecbc66530c309961f53e52c8c
match=Clash/config/**
dest=base/config/
keep_tree=false
[DivineEngine]
url=https://github.com/DivineEngine/Profiles
checkout=f4d75f7d48a3f42129e030bef751d4d22bca02da
match=Surge/Ruleset/**
[NobyDa]
url=https://github.com/NobyDa/Script
checkout=ae4c12f23de8078e02c373c9969b19af28257fcb
match=Surge/*.list

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

File diff suppressed because it is too large Load Diff

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;
@@ -71,6 +78,8 @@ struct Proxy
uint16_t AlterId = 0;
String TransferProtocol;
String FakeType;
String AuthStr;
bool TLSSecure = false;
String Host;
@@ -81,6 +90,7 @@ struct Proxy
String QUICSecret;
tribool UDP;
tribool XUDP;
tribool TCPFastOpen;
tribool AllowInsecure;
tribool TLS13;
@@ -99,6 +109,19 @@ struct Proxy
uint16_t KeepAlive = 0;
String TestUrl;
String ClientId;
String Ports;
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 +132,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

@@ -5,8 +5,7 @@
#include "config/proxy.h"
enum class ConfType
{
enum class ConfType {
Unknow,
SS,
SSR,
@@ -20,26 +19,103 @@ enum class ConfType
Local
};
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 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 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, const std::string &ports, const std::string &sni,
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 &sni,
const std::string &publicKey, const std::string &ports,
tribool udp, tribool tfo,
tribool scv);
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, const std::string &sni,
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, const std::string &fp, const std::string &sni,
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);
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);
void explodeSub(std::string sub, std::vector<Proxy> &nodes);
int explodeConf(const std::string &filepath, std::vector<Proxy> &nodes);
int explodeConfContent(const std::string &content, std::vector<Proxy> &nodes);
#endif // SUBPARSER_H_INCLUDED

View File

@@ -5,11 +5,9 @@
#include <map>
#include <string.h>
struct strICaseComp
{
bool operator() (const std::string &lhs, const std::string &rhs) const
{
return strcasecmp(lhs.c_str(), rhs.c_str());
struct strICaseComp {
bool operator()(const std::string &lhs, const std::string &rhs) const {
return strcasecmp(lhs.c_str(), rhs.c_str()) > 0;
}
};

View File

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