mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
Squashed from: - 856a3730 ci: update go to 1.26 - 191be38f tun: fix IPv6 address under win - 3ca4d5cd windows: v2rayA should read win env like %temp% - 48a84438 windows: v2rayA should start after modified PATH - c87bbf62 fix .exe ext-name under windows - 614bfe1c dns: fix a error about dns format - 991319ff pre.go: don't create C:\etc - 9f31b39c translated all comments to English - aaa269f7 try to fix Tun DNS - 25c84ad9 面向云代理会话的 VS Code 中的检查点 Co-authored-by: Markson Hon <markson@nixos.local>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
_ "github.com/v2rayA/v2rayA/conf/report"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/anytls"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/http"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/hysteria2"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/juicity"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/simpleobfs"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/socks5"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/ss"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/ssr"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/tcp"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/tls"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/trojan"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/trojanc"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/tuic"
|
|
_ "github.com/v2rayA/v2rayA/pkg/plugin/ws"
|
|
"github.com/v2rayA/v2rayA/pkg/util/log"
|
|
)
|
|
|
|
func main() {
|
|
println("[DEBUG] main.main started")
|
|
gin.SetMode(gin.ReleaseMode)
|
|
|
|
// Try running as a service (implemented on Windows, returns false on other platforms)
|
|
if tryRunAsService() {
|
|
return
|
|
}
|
|
|
|
// Normal startup (non-service mode)
|
|
checkEnvironment()
|
|
if err := checkPlatformSpecific(); err != nil {
|
|
log.Fatal("Platform check failed: %v", err)
|
|
}
|
|
initConfigure()
|
|
checkUpdate()
|
|
hello()
|
|
if err := run(); err != nil {
|
|
log.Fatal("main: %v", err)
|
|
}
|
|
}
|