Files
ProjectOctopus/agent-wdd/cmd/xray/vmessTemplate.go
zeaslity 7c92512a7e Improve Xray Proxy Management and Configuration
- Added 'remove' subcommand for Xray proxy
- Enhanced VMESS installation with V2rayNG config generation
- Updated Xray installation process with improved error handling
- Modified vmess template to separate Clash and V2rayNG configurations
- Fixed command existence check in PackageOperator
2025-03-01 00:32:53 +08:00

38 lines
927 B
Go

package xray
var VmessServerTemplate = `
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": {{.PORT}},
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "{{.UUID}}"
}
]
},
"streamSettings": {
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
}
]
}
`
var VmessClientTemplate = `
{"type":"vmess","name":"{{.ServerNodeName}}","server":"{{.ServerNodeAddress}}","port":{{.PORT}},"uuid":"{{.UUID}}","alterId":0,"cipher":"auto","network":"tcp"}
{"v":"2","ps":"{{.ServerNodeName}}","add":"{{.ServerNodeAddress}}","port":{{.PORT}},"id":"{{.UUID}}","aid":0,"scy":"auto","net":"tcp"}
`