Compare commits

..

6 Commits

Author SHA1 Message Date
wenyifan
b8b4e99aec dev 2023-11-21 10:22:09 +08:00
ginuerzh
4c934cd737 add more config options for kcp 2023-11-16 22:19:42 +08:00
ginuerzh
0d494f5ef2 fix #335 2023-11-16 20:39:42 +08:00
ginuerzh
bf1bab7d84 fix race condition in relay udp conn 2023-11-14 22:37:33 +08:00
ginuerzh
b8383b1076 add range port support for forwarder node 2023-11-14 19:43:57 +08:00
ginuerzh
345da28f01 update ingress interface 2023-11-13 20:42:45 +08:00
6 changed files with 23 additions and 8 deletions

View File

@ -30,7 +30,9 @@ jobs:
# this is the most recent version of the image and also
# tag it 'latest'.
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
MAJOR_VERSION=`echo $VERSION | awk '{split($0,a,"."); print a[1]}'`
MINOR_VERSION=`echo $VERSION | awk '{split($0,a,"."); print a[2]}'`
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR_VERSION},${DOCKER_IMAGE}:${MAJOR_VERSION}.${MINOR_VERSION},${DOCKER_IMAGE}:latest"
fi
# Set output parameters.

View File

@ -36,7 +36,7 @@ jobs:
- name: 'Clean up nightly releases'
uses: dev-drprasad/delete-older-releases@v0.3.2
with:
keep_latest: 3
keep_latest: 2
delete_tags: true
delete_tag_pattern: nightly
env:

View File

@ -23,11 +23,14 @@ var (
services stringList
nodes stringList
debug bool
showConfig bool
apiAddr string
metricsAddr string
)
func init() {
log.SetFlags(log.LstdFlags | log.Lshortfile | log.Lmicroseconds)
args := strings.Join(os.Args[1:], " ")
if strings.Contains(args, " -- ") {
@ -76,6 +79,7 @@ func init() {
flag.BoolVar(&printVersion, "V", false, "print version")
flag.StringVar(&outputFormat, "O", "", "output format, one of yaml|json format")
flag.BoolVar(&debug, "D", false, "debug mode")
flag.BoolVar(&showConfig, "P", false, "print config only")
flag.StringVar(&apiAddr, "api", "", "api service address")
flag.StringVar(&metricsAddr, "metrics", "", "metrics service address")
flag.Parse()

View File

@ -1,6 +1,8 @@
package main
import (
"fmt"
"gopkg.in/yaml.v2"
"net/http"
"os"
@ -93,6 +95,13 @@ func (p *program) Start() error {
log := logger.Default()
cfg := config.Global()
if showConfig {
marshal, _ := yaml.Marshal(cfg)
fmt.Println(string(marshal))
os.Exit(0)
return nil
}
if cfg.API != nil {
s, err := buildAPIService(cfg.API)
if err != nil {

4
go.mod
View File

@ -5,8 +5,8 @@ go 1.21
replace github.com/templexxx/cpu v0.0.7 => github.com/templexxx/cpu v0.0.10-0.20211111114238-98168dcec14a
require (
github.com/go-gost/core v0.0.0-20231109123312-8e4fc06cf1b7
github.com/go-gost/x v0.0.0-20231110132911-696d10fc28b3
github.com/go-gost/core v0.0.0-20231113123850-a916f0401649
github.com/go-gost/x v0.0.0-20231116134211-2c82233b4f2f
github.com/judwhite/go-svc v1.2.1
gopkg.in/natefinch/lumberjack.v2 v2.0.0
)

8
go.sum
View File

@ -94,8 +94,8 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gost/core v0.0.0-20231109123312-8e4fc06cf1b7 h1:sDsPtmP51qf8zN/RbZZj/3vNLCoH0sdvpIRwV6TfzvY=
github.com/go-gost/core v0.0.0-20231109123312-8e4fc06cf1b7/go.mod h1:ndkgWVYRLwupVaFFWv8ML1Nr8tD3xhHK245PLpUDg4E=
github.com/go-gost/core v0.0.0-20231113123850-a916f0401649 h1:14iGAk7cqc+aDWtsuY6CWpP0lvC54pA5Izjeh5FdQNs=
github.com/go-gost/core v0.0.0-20231113123850-a916f0401649/go.mod h1:ndkgWVYRLwupVaFFWv8ML1Nr8tD3xhHK245PLpUDg4E=
github.com/go-gost/gosocks4 v0.0.1 h1:+k1sec8HlELuQV7rWftIkmy8UijzUt2I6t+iMPlGB2s=
github.com/go-gost/gosocks4 v0.0.1/go.mod h1:3B6L47HbU/qugDg4JnoFPHgJXE43Inz8Bah1QaN9qCc=
github.com/go-gost/gosocks5 v0.4.0 h1:EIrOEkpJez4gwHrMa33frA+hHXJyevjp47thpMQsJzI=
@ -106,8 +106,8 @@ github.com/go-gost/relay v0.4.1-0.20230916134211-828f314ddfe7 h1:qAG1OyjvdA5h221
github.com/go-gost/relay v0.4.1-0.20230916134211-828f314ddfe7/go.mod h1:lcX+23LCQ3khIeASBo+tJ/WbwXFO32/N5YN6ucuYTG8=
github.com/go-gost/tls-dissector v0.0.2-0.20220408131628-aac992c27451 h1:xj8gUZGYO3nb5+6Bjw9+tsFkA9sYynrOvDvvC4uDV2I=
github.com/go-gost/tls-dissector v0.0.2-0.20220408131628-aac992c27451/go.mod h1:/9QfdewqmHdaE362Hv5nDaSWLx3pCmtD870d6GaquXs=
github.com/go-gost/x v0.0.0-20231110132911-696d10fc28b3 h1:TAnvPP93PKU6Kush14Ej/Y6mERGCxLKyZKm5VWNT+vI=
github.com/go-gost/x v0.0.0-20231110132911-696d10fc28b3/go.mod h1:w0AiBBOkvUvKK1zM/sEzUXeC8dQaUUeYAA5w6SsBMnA=
github.com/go-gost/x v0.0.0-20231116134211-2c82233b4f2f h1:12BXAiQqOGJo9rG6zMUGUknqhobarHS14qcTp5WtGlU=
github.com/go-gost/x v0.0.0-20231116134211-2c82233b4f2f/go.mod h1:fR9VrbKP93FitqeHGxJxRhPsJi5YOAaMRmkBfxEPHJM=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=