diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 80ce07b23..aad8d4bbb 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -20,6 +20,8 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 + - name: Run tests + run: cd test && go test && cd .. - name: Build run: mkdir dist && go build -tags "full" -o dist - name: Upload Binary diff --git a/common/common.go b/common/common.go index a6a9bc767..480a70467 100644 --- a/common/common.go +++ b/common/common.go @@ -11,7 +11,7 @@ import ( ) const ( - Version = "v0.4.5" + Version = "v0.4.6" ) type Runnable interface { diff --git a/docs/config.toml b/docs/config.toml index 887ca0256..e535ce7c7 100755 --- a/docs/config.toml +++ b/docs/config.toml @@ -16,7 +16,7 @@ enableMissingTranslationPlaceholders = false # Source Code repository section description = "An unidentifiable mechanism that helps you bypass GFW. " github_repository = "https://github.com/p4gefau1t/trojan-go" - version = "0.4.5" + version = "0.4.6" # Documentation repository section # documentation repository (set edit link to documentation repository) diff --git a/docs/content/developer/simplesocks.md b/docs/content/developer/simplesocks.md index 01b19eb35..a0a25ff4a 100644 --- a/docs/content/developer/simplesocks.md +++ b/docs/content/developer/simplesocks.md @@ -8,7 +8,7 @@ SimpleSocks协议是无认证机制的简单代理协议,本质上就是去除 SimpleSocks甚至比Socks5更简单,下面是头部结构。 -``` +```text +-----+------+----------+----------+-----------+ | CMD | ATYP | DST.ADDR | DST.PORT | Payload | +-----+------+----------+----------+-----------+ diff --git a/proxy/client/nat.go b/proxy/client/nat.go index 36f428f6e..d8fe3c209 100644 --- a/proxy/client/nat.go +++ b/proxy/client/nat.go @@ -88,6 +88,7 @@ func (n *NAT) listenTCP(errChan chan error) { }) if err != nil { errChan <- err + return } n.listener = listener defer listener.Close()