Skip to content

Commit 8e58585

Browse files
committed
fix: 回退版本
1 parent bae8edf commit 8e58585

File tree

5 files changed

+66
-112
lines changed

5 files changed

+66
-112
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
git config --global user.name 'github-actions'
2626
git config --global user.email '[email protected]'
27-
TAG="v0.0.6-$(date +'%Y%m%d%H%M%S')"
27+
TAG="v0.0.5-$(date +'%Y%m%d%H%M%S')"
2828
git tag $TAG
2929
git push origin $TAG
3030
echo "TAG=$TAG" >> $GITHUB_ENV

cmd/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ func main() {
8383
gostunFlag.StringVar(&model.AddrStr, "server", "stun.voipgate.com:3478", "Specify STUN server address")
8484
gostunFlag.BoolVar(&model.EnableLoger, "e", true, "Enable logging functionality")
8585
gostunFlag.StringVar(&model.IPVersion, "type", "ipv4", "Specify ip test version: ipv4, ipv6 or both")
86-
gostunFlag.StringVar(&model.TransmissionProtocol, "protocol", "udp", "Specify transmission protocol: udp, tcp, or tls")
8786
gostunFlag.Parse(os.Args[1:])
8887
if help {
8988
fmt.Printf("Usage: %s [options]\n", os.Args[0])
@@ -164,4 +163,4 @@ func main() {
164163
model.IPVersion = originalIPVersion
165164
res := stuncheck.CheckType()
166165
fmt.Printf("NAT Type: %s\n", res)
167-
}
166+
}

model/model.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ package model
22

33
import "github.com/pion/logging"
44

5-
const GoStunVersion = "v0.0.6"
5+
const GoStunVersion = "v0.0.5"
66

77
var (
88
AddrStr = "stun.voipgate.com:3478"
9-
Timeout = 5
9+
Timeout = 3
1010
Verbose = 0
1111
Log logging.LeveledLogger
1212
NatMappingBehavior string
1313
NatFilteringBehavior string
1414
EnableLoger = true
1515
IPVersion = "ipv4"
16-
TransmissionProtocol = "udp"
1716
)
1817

1918
func GetDefaultServers(IPVersion string) []string {
@@ -57,4 +56,4 @@ func GetDefaultServers(IPVersion string) []string {
5756
"stun.f.haeder.net:3478",
5857
}
5958
}
60-
}
59+
}

stuncheck/checktype.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"github.com/oneclickvirt/gostun/model"
77
)
88

9+
// CheckType
10+
// Summarize the NAT type
911
func CheckType() string {
1012
var result string
1113
if model.NatMappingBehavior != "" && model.NatFilteringBehavior != "" {
@@ -28,4 +30,4 @@ func CheckType() string {
2830
result = "Inconclusive"
2931
}
3032
return result
31-
}
33+
}

0 commit comments

Comments
 (0)