MCPcopy
hub / github.com/windtf/wireproxy / resolveIPPAndPort

Function resolveIPPAndPort

config.go:239–250  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

237}
238
239func resolveIPPAndPort(addr string) (string, error) {
240 host, port, err := net.SplitHostPort(addr)
241 if err != nil {
242 return "", err
243 }
244
245 ip, err := resolveIP(host)
246 if err != nil {
247 return "", err
248 }
249 return net.JoinHostPort(ip.String(), port), nil
250}
251
252// ParseInterface parses the [Interface] section and extract the information into `device`
253func ParseInterface(cfg *ini.File, device *DeviceConfig) error {

Callers 1

ParsePeersFunction · 0.85

Calls 1

resolveIPFunction · 0.85

Tested by

no test coverage detected