<TCPFORWORD> <TARGET IP="192.168.1.98" PORT="9527" /> <TARGET IP="192.168.1.97" PORT="9527" /> </TCPFORWORD>
type ServerConfig struct { SERVERPORT int TCPFORWORD tcpForword } type tcpForword struct { XMLName xml.Name `xml:"TCPFORWORD"` TARGETS []tcpTarget `xml:"TARGET"` } type tcpTarget struct { XMLName xml.Name `xml:"TARGET"` IP string `xml:"IP,attr"` PORT string `xml:"PORT,attr"` }
有疑问加站长微信联系(非本文作者)