diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 33872f0..28cfea0 100644 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -6c7ba00b8550f05fc02d7ee5b2c2a3a6 \ No newline at end of file +c6780ba96b30b5bc41d0b12c1bbd890e \ No newline at end of file diff --git a/port_forwarder.go b/port_forwarder.go index 524f562..6b424f3 100644 --- a/port_forwarder.go +++ b/port_forwarder.go @@ -31,7 +31,7 @@ func NewProtocol(value string) (Protocol, error) { type IpAddress struct { Ip string `json:"ip"` - Port int16 `json:"port"` + Port uint16 `json:"port"` Proto Protocol `json:"proto"` } diff --git a/wails.json b/wails.json index 399059d..8533278 100644 --- a/wails.json +++ b/wails.json @@ -13,7 +13,7 @@ "info": { "companyName": "qszdev.com", "productName": "Port Forward", - "productVersion": "1.0.1" + "productVersion": "1.0.2" }, "wailsjsdir": "./frontend/src" } diff --git a/windows.go b/windows.go index 53dbaac..09926ad 100644 --- a/windows.go +++ b/windows.go @@ -93,8 +93,8 @@ func (ws WindowsPortForwarder) Get() ([]PortForward, error) { arr1 := removeEmpty(strings.Split(portmaptext, ";")) for _, item := range arr1 { portMapItem := removeEmpty(strings.Split(item, " ")) - sourcePort, _ := strconv.ParseInt(portMapItem[3], 10, 16) - targetPort, _ := strconv.ParseInt(portMapItem[5], 10, 16) + sourcePort, _ := strconv.ParseInt(portMapItem[3], 10, 64) + targetPort, _ := strconv.ParseInt(portMapItem[5], 10, 64) sourceProto, err := NewProtocol(portMapItem[0]) if err != nil { @@ -110,12 +110,12 @@ func (ws WindowsPortForwarder) Get() ([]PortForward, error) { Source: IpAddress{ Proto: sourceProto, Ip: portMapItem[2], - Port: int16(sourcePort), + Port: uint16(sourcePort), }, Target: IpAddress{ Proto: targetProto, Ip: portMapItem[4], - Port: int16(targetPort), + Port: uint16(targetPort), }, }) }