diff --git a/.gitignore b/.gitignore
index 3d3972d..051543b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,5 +15,5 @@ goodlink.json
config.json
*.upx
debug.sh
-wintun.dll
-nac.syso
+*.dll
+*.syso
diff --git a/FyneApp.toml b/FyneApp.toml
index b5c3cfa..a9398cf 100644
--- a/FyneApp.toml
+++ b/FyneApp.toml
@@ -1,8 +1,8 @@
Website = "https://goodlink.kony.vip"
[Details]
- Icon = "theme/favicon.png"
+ Icon = "assert/favicon.png"
Name = "goodlink-windows-amd64-ui"
ID = "goodlink.kony.vip"
- Version = "2.1.1"
+ Version = "2.1.2"
Build = 0
diff --git a/Makefile b/Makefile
index 72b853c..be0ad35 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,8 @@ GOBUILD=GO111MODULE=on \
-X "gogo.BuildTime=$(BuildTime)" \
-w -s -buildid='
-LINUX_PLATFORM_LIST = \
+PLATFORM_LIST = \
+ windows-arm64-cmd \
linux-386-cmd \
linux-amd64-cmd \
linux-arm-cmd \
@@ -24,12 +25,11 @@ LINUX_PLATFORM_LIST = \
linux-riscv64-cmd \
linux-mips64le-cmd
-WINDOWS_PLATFORM_LIST = \
+NAC_PLATFORM_LIST = \
windows-amd64-ui \
windows-amd64-cmd \
- windows-arm64-cmd
-all: $(WINDOWS_PLATFORM_LIST) rm_uac $(LINUX_PLATFORM_LIST) strip
+all: create_nac $(NAC_PLATFORM_LIST) rm_nac $(PLATFORM_LIST) strip
linux-386-cmd:
GOARCH=386 GOOS=linux $(GOBUILD) -tags "cmd" -o $(BINDIR)/$(NAME)-$@
@@ -81,10 +81,10 @@ windows-amd64-ui:
# go build -ldflags -H=windowsgui
mkdir bin; fyne package; mv *.exe bin/
-create_uac:
+create_nac:
rsrc -manifest nac.manifest -o nac.syso
-rm_uac:
+rm_nac:
rm -rf nac.syso
strip:
diff --git a/README.md b/README.md
index bab657f..709132a 100644
--- a/README.md
+++ b/README.md
@@ -49,23 +49,17 @@
### TUN模式
- Local端会创建一个虚拟网卡, 因此需要管理员权限运行。连接成功后,界面会显示: 对端IP
+ Local端会创建一个虚拟网卡, 因此需要管理员权限运行。连接成功后,界面会显示: Remote端IP
- 不限端口,访问对端IP的任意端口,相当于访问Remote端本机的任意端口
-
- 对端IP目前固定为: 192.17.19.1 , 具体以界面或者日志显示为准
-
- 举例: 在Local端打开 windows 远程桌面, 填写对端IP, 即可访问Remote端的远程桌面
+ 举例: 在Local端打开 windows 远程桌面, 填写Remote端IP, 即可访问Remote端的远程桌面
### 代理模式
- 代理端口目前固定为: 1080
+ 代理地址端口: socket5://Remote端IP:1080
- 代理地址端口: socket5://对端IP:1080
+ 举例: 在Local端配置socket5代理: socks5://Remote端IP:1080, 即可利用Remote端做跳板, 访问所有的网络资源
- 举例: 在Local端配置代理: socks5://对端IP:1080, 即可通过Remote端访问所有的网络资源
-
- 注: 目前仅支持TCP代理,浏览器可安装插件 SwitchyOmega。其他 GIT, SVN, SSH 等, 都支持socks5代理
+ 注: 目前仅支持TCP代理,浏览器可安装插件 SwitchyOmega。其他 GIT, SVN, SSH 等, 都支持socket5代理
# 简单使用
diff --git a/assert/favicon.png b/assert/favicon.png
new file mode 100644
index 0000000..50352e7
Binary files /dev/null and b/assert/favicon.png differ
diff --git a/assert/letter-g-2.png b/assert/letter-g-2.png
index 522d93b..f9ace6d 100644
Binary files a/assert/letter-g-2.png and b/assert/letter-g-2.png differ
diff --git a/assert/letter-g-3.png b/assert/letter-g-3.png
new file mode 100644
index 0000000..522d93b
Binary files /dev/null and b/assert/letter-g-3.png differ
diff --git a/assert/letter-g.png b/assert/letter-g.png
deleted file mode 100644
index 70da97b..0000000
Binary files a/assert/letter-g.png and /dev/null differ
diff --git a/assert/letter-g.svg b/assert/letter-g.svg
deleted file mode 100644
index 660dbc6..0000000
--- a/assert/letter-g.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/nac.manifest b/nac.manifest
index 22d8746..45834ef 100644
--- a/nac.manifest
+++ b/nac.manifest
@@ -1,10 +1,10 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pprof.bat b/pprof.bat
new file mode 100644
index 0000000..eb3fc6c
--- /dev/null
+++ b/pprof.bat
@@ -0,0 +1 @@
+go tool pprof -http=":6060" http://192.17.19.1:6060/debug/pprof/profile?seconds=15
\ No newline at end of file
diff --git a/pro/comm.go b/pro/comm.go
index b14c8cd..69b9848 100644
--- a/pro/comm.go
+++ b/pro/comm.go
@@ -24,7 +24,7 @@ var (
)
const (
- m_version = "2.1.1"
+ m_version = "2.1.2"
)
func Init() error {
diff --git a/pro/local.go b/pro/local.go
index c387e32..5c71f34 100644
--- a/pro/local.go
+++ b/pro/local.go
@@ -40,11 +40,11 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
switch conn_type {
case 0:
- utils.Log().Debug("请求连接对端")
+ utils.Log().Debug("请求连接Remote端")
default:
redisJson.LocalAddr = *addr
- utils.Log().DebugF("发送本端地址: %v", redisJson.LocalAddr)
+ utils.Log().DebugF("发送Local端地址: %v", redisJson.LocalAddr)
}
RedisSet(15*time.Second, &redisJson)
@@ -74,7 +74,7 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
return tun_active, tun_passive, nil, nil, errors.New("两端版本不兼容")
}
- utils.Log().DebugF("收到对端地址: %v", redisJson.RemoteAddr)
+ utils.Log().DebugF("收到Remote端地址: %v", redisJson.RemoteAddr)
switch conn_type {
case 0:
@@ -89,7 +89,7 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
tun_passive.Start()
redisJson.State = 2
- utils.Log().DebugF("发送本端地址: %v", redisJson.LocalAddr)
+ utils.Log().DebugF("发送Local端地址: %v", redisJson.LocalAddr)
RedisSet(redisJson.RedisTimeOut, &redisJson)
default:
@@ -126,7 +126,7 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
return tun_active, tun_passive, nil, nil, nil
default:
- utils.Log().DebugF("等待对端状态: Local: %v => Remote: %v", redisJson.LocalAddr, redisJson.RemoteAddr)
+ utils.Log().DebugF("等待Remote端状态: Local: %v => Remote: %v", redisJson.LocalAddr, redisJson.RemoteAddr)
}
}
@@ -170,7 +170,7 @@ func RunLocal(tun_key string) error {
}
udp_conn, addr = GetUDPAddr()
- log.Printf("本端地址: %v", addr)
+ log.Printf("Local端地址: %v", addr)
count++
@@ -188,7 +188,7 @@ func RunLocal(tun_key string) error {
m_tun_passive = tun_passive
netstack.SetForWarder(quic_conn)
- utils.Log().DebugF("对端IP: %s", netstack.GetRemoteIP())
+ utils.Log().DebugF("Remote端IP: %s", netstack.GetRemoteIP())
m_local_state = 2
tun.ProcessHealth(health)
diff --git a/pro/remote.go b/pro/remote.go
index 71da096..5fd257c 100644
--- a/pro/remote.go
+++ b/pro/remote.go
@@ -75,7 +75,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
switch redisJson.State {
case 0:
- utils.Log().DebugF("收到对端请求: %v", redisJson)
+ utils.Log().DebugF("收到Local端请求: %v", redisJson)
redisJson.State = 1
@@ -90,7 +90,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
switch redisJson.LocalAddr.WanPort1 {
case 0:
conn_type = 0
- utils.Log().Debug("对端未发来IP")
+ utils.Log().Debug("Local端未发来IP")
if tun_active != nil {
tun_active.Release()
@@ -103,7 +103,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
redisJson.SendPortCount = 0x100
default:
- utils.Log().DebugF("对端有发来IP: %v", redisJson.LocalAddr)
+ utils.Log().DebugF("Local端有发来IP: %v", redisJson.LocalAddr)
conn_type = 1
if tun_passive != nil {
@@ -117,23 +117,23 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
tun_passive_chain = tun_passive.GetChain()
}
- utils.Log().DebugF("发送本端地址: %v", redisJson.RemoteAddr)
+ utils.Log().DebugF("发送Remote端地址: %v", redisJson.RemoteAddr)
RedisSet(redisJson.RedisTimeOut, &redisJson)
case 2:
switch conn_type {
case 0:
- utils.Log().DebugF("收到对端地址: %v", redisJson.LocalAddr)
+ utils.Log().DebugF("收到Local端地址: %v", redisJson.LocalAddr)
tun_active.Start()
case 1:
- utils.Log().DebugF("收到对端地址, 等待连接: %v", redisJson.LocalAddr)
+ utils.Log().DebugF("收到Local端地址, 等待连接: %v", redisJson.LocalAddr)
}
select {
case <-tun_active_chain:
redisJson.State = 3
- utils.Log().Debug("对端被动连接成功")
+ utils.Log().Debug("Local端被动连接成功")
RedisSet(redisJson.RedisTimeOut, &redisJson)
if tun_active != nil {
return udp_conn, tun_active, tun_passive, tun_active.TunQuicConn, tun_active.TunHealthStream
@@ -142,7 +142,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
case <-tun_passive_chain:
redisJson.State = 3
- utils.Log().Debug("对端主动连接成功")
+ utils.Log().Debug("Local端主动连接成功")
RedisSet(redisJson.RedisTimeOut, &redisJson)
if tun_passive != nil {
return udp_conn, tun_active, tun_passive, tun_passive.TunQuicConn, tun_passive.TunHealthStream
@@ -151,7 +151,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
case <-time.After(time.Duration(config.Arg_p2p_timeout) * time.Second):
redisJson.State = 4
- utils.Log().Debug("对端连接超时")
+ utils.Log().Debug("Local端连接超时")
RedisSet(redisJson.RedisTimeOut, &redisJson)
return udp_conn, tun_active, tun_passive, nil, nil
}
@@ -159,7 +159,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
case 3, 4:
default:
- utils.Log().DebugF("等待对端状态: Local: %v => Remote: %v", redisJson.LocalAddr, redisJson.RemoteAddr)
+ utils.Log().DebugF("等待Local端状态: Local: %v => Remote: %v", redisJson.LocalAddr, redisJson.RemoteAddr)
}
last_state = redisJson.State
diff --git a/proxy/proxy_r.go b/proxy/proxy_r.go
index da6146c..e4dc11e 100644
--- a/proxy/proxy_r.go
+++ b/proxy/proxy_r.go
@@ -30,7 +30,7 @@ func ProcessProxyServer(stun_quic_conn quic.Connection) {
fewfgwegwe:
new_quic_stream, err := stun_quic_conn.AcceptStream(context.Background())
if err != nil {
- continue
+ return
}
_, err = io.ReadFull(new_quic_stream, buf[:head_len])
diff --git a/theme/favicon.png b/theme/favicon.png
deleted file mode 100644
index 70da97b..0000000
Binary files a/theme/favicon.png and /dev/null differ