mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-25 20:06:25 +02:00
Compare commits
2 Commits
a9e8e427a5
...
4ea9884c6c
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ea9884c6c | |||
| 3c84a94f11 |
Vendored
+30
@@ -24,6 +24,15 @@
|
|||||||
"${input:githubRemoteUsername}",
|
"${input:githubRemoteUsername}",
|
||||||
"git@github.com:${input:githubRemoteUsername}/gluetun.git"
|
"git@github.com:${input:githubRemoteUsername}/gluetun.git"
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Devrun",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "go run ./cmd/main.go run ${input:devrunProvider} ${input:devrunVPNProtocol} ${input:devrunExtraFlags}",
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}/devrun"
|
||||||
|
},
|
||||||
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -47,5 +56,26 @@
|
|||||||
"type": "promptString",
|
"type": "promptString",
|
||||||
"description": "Please enter a Github username",
|
"description": "Please enter a Github username",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "devrunProvider",
|
||||||
|
"type": "promptString",
|
||||||
|
"description": "Please enter a single provider",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "devrunVPNProtocol",
|
||||||
|
"type": "pickString",
|
||||||
|
"description": "VPN protocol to use",
|
||||||
|
"options": [
|
||||||
|
"wireguard",
|
||||||
|
"openvpn"
|
||||||
|
],
|
||||||
|
"default": "wireguard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "devrunExtraFlags",
|
||||||
|
"type": "promptString",
|
||||||
|
"description": "Extra flags (optional)",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"syscall"
|
"strings"
|
||||||
|
|
||||||
"github.com/jsimonetti/rtnetlink"
|
"github.com/jsimonetti/rtnetlink"
|
||||||
"github.com/qdm12/gluetun/internal/pmtud/constants"
|
"github.com/qdm12/gluetun/internal/pmtud/constants"
|
||||||
@@ -54,8 +54,7 @@ func srcIP(dst netip.Addr) (netip.Addr, error) {
|
|||||||
}
|
}
|
||||||
messages, err := conn.Route.Get(requestMessage)
|
messages, err := conn.Route.Get(requestMessage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var sysErr syscall.Errno
|
if strings.Contains(err.Error(), "network is unreachable") {
|
||||||
if errors.As(err, &sysErr) && sysErr == syscall.ENETUNREACH {
|
|
||||||
err = ErrNetworkUnreachable
|
err = ErrNetworkUnreachable
|
||||||
}
|
}
|
||||||
return netip.Addr{}, fmt.Errorf("getting routes to %s: %w", dst, err)
|
return netip.Addr{}, fmt.Errorf("getting routes to %s: %w", dst, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user