mirror of
https://gitee.com/konyshe/goodlink.git
synced 2025-09-26 20:51:22 +08:00
add go2
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,7 +5,7 @@ __debug_bin*
|
||||
*.pdf
|
||||
bin
|
||||
upx
|
||||
gotools
|
||||
go2
|
||||
*.exe
|
||||
fyne_metadata_init.go
|
||||
fyne.syso
|
||||
|
@@ -16,7 +16,7 @@ COPY --from=tonistiigi/xx:golang / /
|
||||
ARG TARGETOS TARGETARCH TARGETVARIANT
|
||||
|
||||
RUN echo 111111111111
|
||||
COPY gotools /go/src/gotools
|
||||
COPY go2 /go/src/go2
|
||||
COPY goodlink2 /go/src/goodlink2
|
||||
|
||||
RUN --mount=target=. \
|
||||
|
6
Makefile
6
Makefile
@@ -6,9 +6,9 @@ BuildTime=$(shell date +'%Y-%m-%d %H:%M:%S')
|
||||
GOBUILD=GO111MODULE=on \
|
||||
GOPROXY="https://goproxy.cn,direct" \
|
||||
go build -trimpath -ldflags \
|
||||
'-X "gotools.GitCommitLog=$(GitCommitLog)" \
|
||||
-X "gotools.GitStatus=$(GitStatus)" \
|
||||
-X "gotools.BuildTime=$(BuildTime)" \
|
||||
'-X "go2.GitCommitLog=$(GitCommitLog)" \
|
||||
-X "go2.GitStatus=$(GitStatus)" \
|
||||
-X "go2.BuildTime=$(BuildTime)" \
|
||||
-w -s -buildid='
|
||||
|
||||
PLATFORM_LIST = \
|
||||
|
6
build.sh
6
build.sh
@@ -2,8 +2,8 @@
|
||||
|
||||
set -x
|
||||
|
||||
rm -rf gotools goodlink2
|
||||
cp -r ../gotools .
|
||||
rm -rf go2 goodlink2
|
||||
cp -r ../go2 .
|
||||
cp -r ../goodlink2 .
|
||||
|
||||
if [ -e "/usr/bin/upx" ]; then
|
||||
@@ -26,7 +26,7 @@ docker pull tonistiigi/xx:golang
|
||||
|
||||
docker buildx build --platform linux/amd64 -t dev/goodlink:latest .
|
||||
|
||||
rm -rf gotools goodlink2 upx
|
||||
rm -rf go2 goodlink2 upx
|
||||
|
||||
sed -i "/$BUILD_TIME/s/$BUILD_TIME/111111111111/g" Dockerfile
|
||||
|
||||
|
@@ -3,7 +3,7 @@ package config
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"gotools"
|
||||
"go2"
|
||||
"os"
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ func Help(ver string) {
|
||||
|
||||
if *v {
|
||||
fmt.Printf("Version: %s\n", ver)
|
||||
fmt.Print(gotools.BuildVersion())
|
||||
fmt.Print(go2.BuildVersion())
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@ package config
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"go2"
|
||||
"goodlink/aes"
|
||||
"gotools"
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -38,7 +38,7 @@ func Init() error {
|
||||
var err error
|
||||
var resp *http.Response
|
||||
|
||||
if res = gotools.Utils().FileReadAll("config.json"); res == nil {
|
||||
if res = go2.Utils().FileReadAll("config.json"); res == nil {
|
||||
client := &http.Client{
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
@@ -70,8 +70,8 @@ func Init() error {
|
||||
|
||||
body, _ := json.Marshal(configInfo)
|
||||
temp3 := aes.Encrypt(body, "goodlink")
|
||||
gotools.Utils().FileDel("config.json")
|
||||
gotools.Utils().FileAppend("config.json", []byte(temp3))
|
||||
go2.Utils().FileDel("config.json")
|
||||
go2.Utils().FileAppend("config.json", []byte(temp3))
|
||||
*/
|
||||
return nil
|
||||
}
|
||||
|
4
go.mod
4
go.mod
@@ -17,7 +17,7 @@ require (
|
||||
golang.org/x/sys v0.34.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb
|
||||
goodlink2 v0.0.0
|
||||
gotools v0.0.0
|
||||
go2 v0.0.0
|
||||
gvisor.dev/gvisor v0.0.0-20250806010417-2099bc1c6a2e
|
||||
)
|
||||
|
||||
@@ -92,7 +92,7 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
replace gotools => ../gotools
|
||||
replace go2 => ../go2
|
||||
|
||||
replace goodlink2 => ../goodlink2
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package netstack
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"go2"
|
||||
"goodlink/winipcfg"
|
||||
"gotools"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/netip"
|
||||
@@ -70,7 +70,7 @@ func InitWintunDll() error {
|
||||
return err
|
||||
}
|
||||
|
||||
gotools.Utils().FileAppend("wintun.dll", res)
|
||||
go2.Utils().FileAppend("wintun.dll", res)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ package ui2
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"gotools"
|
||||
"go2"
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
@@ -89,7 +89,7 @@ func start_button_click() {
|
||||
})
|
||||
log.Println(string(configByte))
|
||||
os.Remove("goodlink.json")
|
||||
gotools.Utils().FileAppend("goodlink.json", configByte)
|
||||
go2.Utils().FileAppend("goodlink.json", configByte)
|
||||
}
|
||||
|
||||
switch m_stats_start_button {
|
||||
|
@@ -4,7 +4,7 @@ package ui2
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"gotools"
|
||||
"go2"
|
||||
"log"
|
||||
|
||||
"goodlink/config"
|
||||
@@ -37,7 +37,7 @@ const (
|
||||
|
||||
func GetMainUI(myWindow *fyne.Window) *fyne.Container {
|
||||
var configInfo config.ConfigInfo
|
||||
json.Unmarshal(gotools.Utils().FileReadAll("goodlink.json"), &configInfo)
|
||||
json.Unmarshal(go2.Utils().FileReadAll("goodlink.json"), &configInfo)
|
||||
log.Println(configInfo)
|
||||
|
||||
m_validated_key = widget.NewEntry()
|
||||
|
Reference in New Issue
Block a user