feat(fastestvpn): Wireguard support (#2383)

Credits to @Zerauskire for the initial investigation and @jvanderzande for an initial implementation as well as reviewing the pull request
This commit is contained in:
Quentin McGaw
2024-07-31 16:16:50 +02:00
committed by GitHub
parent 7bc2972b27
commit 13ffffb157
10 changed files with 800 additions and 63 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/stretchr/testify/assert"
)
@@ -32,14 +33,14 @@ func Test_Servers_ToMarkdown(t *testing.T) {
provider: providers.Fastestvpn,
servers: Servers{
Servers: []Server{
{Country: "a", Hostname: "xa", TCP: true},
{Country: "b", Hostname: "xb", UDP: true},
{Country: "a", Hostname: "xa", VPN: vpn.OpenVPN, TCP: true},
{Country: "b", Hostname: "xb", VPN: vpn.OpenVPN, UDP: true},
},
},
expectedMarkdown: "| Country | Hostname | TCP | UDP |\n" +
"| --- | --- | --- | --- |\n" +
"| a | `xa` | ✅ | ❌ |\n" +
"| b | `xb` | ❌ | ✅ |\n",
expectedMarkdown: "| Country | Hostname | VPN | TCP | UDP |\n" +
"| --- | --- | --- | --- | --- |\n" +
"| a | `xa` | openvpn | ✅ | ❌ |\n" +
"| b | `xb` | openvpn | ❌ | ✅ |\n",
},
}