mirror of
https://github.com/Alexey71/opera-proxy.git
synced 2026-05-13 22:20:59 +00:00
WIP
This commit is contained in:
@@ -2,6 +2,8 @@ package seclient
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"fmt"
|
||||
"errors"
|
||||
"strconv"
|
||||
)
|
||||
@@ -78,6 +80,14 @@ type SEIPEntry struct {
|
||||
Ports []uint16 `json:"ports"`
|
||||
}
|
||||
|
||||
func (e *SEIPEntry) NetAddr() string {
|
||||
if len(e.Ports) == 0 {
|
||||
return net.JoinHostPort(e.IP, "443")
|
||||
} else {
|
||||
return net.JoinHostPort(e.IP, fmt.Sprintf("%d", e.Ports[0]))
|
||||
}
|
||||
}
|
||||
|
||||
type SEDiscoverResponse struct {
|
||||
Data struct {
|
||||
IPs []SEIPEntry `json:"ips"`
|
||||
|
||||
Reference in New Issue
Block a user