<{% tplinclude "setting_form.html" . | println %}>
+ <{% tplinclude "v2raylist.html" . | println %}>
<{% tplinclude "add_v2ray_form.html" nil | println %}>
diff --git a/main/resource/v2raylist.html b/main/resource/v2raylist.html
new file mode 100644
index 0000000..1b56afd
--- /dev/null
+++ b/main/resource/v2raylist.html
@@ -0,0 +1,160 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webserver/v2ray_ctl.go b/webserver/v2ray_ctl.go
index f824a4e..e8b4886 100644
--- a/webserver/v2ray_ctl.go
+++ b/webserver/v2ray_ctl.go
@@ -104,6 +104,7 @@ func RunV2ray(fpath, msg string) []byte {
}
func GetV2rayList() []byte {
+ cf := conf.GetConf()
pp := vp.GetProxyPool()
slist := pp.GetV2rayServerList()
var rows []map[string]any
@@ -117,21 +118,27 @@ func GetV2rayList() []byte {
localPorts := ""
runmode := "个性配置"
vports := vs.GetLocalPortList()
+
+ vapiport := cf.V2rayApiPort
+ sysport := cf.GetHttpProxyPort()
for i, port := range vports {
+ if port == vapiport {
+ runmode = "动态代理池"
+ }
+ if port == sysport {
+ runmode = "系统代理"
+ }
addStr := fmt.Sprintf("%d", port)
if i > 0 {
addStr = "," + addStr
}
localPorts += addStr
}
- if confile == "" {
- runmode = "动态代理池"
+ if runmode == "动态代理池" {
localPorts += "," + pp.GetLocalPortRange()
- } else {
- if vs.GetLocalPort() > 0 {
- runmode = "系统代理"
- confile = vp.ROUTING_RULES_FILE + " -> " + confile
- }
+ }
+ if runmode == "系统代理" {
+ confile = vp.ROUTING_RULES_FILE + " -> " + confile
}
data := map[string]any{
"pid": pid,