From d277deacd051b06cce38e135e7ffa8df1c92986b Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Tue, 12 Dec 2023 07:40:44 +0100 Subject: [PATCH] issue #15 : implemented wireguard test --- test/test.yml | 1 + test/wireguard-test1-expect.xml | 74 +++++++++++++++++++++++++++++++++ test/wireguard-test1.yml | 63 ++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 test/wireguard-test1-expect.xml create mode 100644 test/wireguard-test1.yml diff --git a/test/test.yml b/test/test.yml index ab7fd04..e089bb9 100644 --- a/test/test.yml +++ b/test/test.yml @@ -15,3 +15,4 @@ with_items: - filter - alias + - wireguard diff --git a/test/wireguard-test1-expect.xml b/test/wireguard-test1-expect.xml new file mode 100644 index 0000000..e9498bd --- /dev/null +++ b/test/wireguard-test1-expect.xml @@ -0,0 +1,74 @@ + + + + + + 1 + + + + + 1 + wgc1 + +pW8dSurC0UGBc+LWoGWuQKVbBa56Y/pK4MW1ZwuKXc= + mrbZjO476CVrr9YBTksVJK6ABr5mcTOsME2CaDYqb3g= + 192.168.0.242 + 5555 + 30 + 192.168.20.0/24,192.168.255.0/24,192.168.0.253/32 + + + 1 + wgc2 + BWT7WnYwV+86zhf4OAlGYwCZKlvvXrvoP6dd8cYcaAQ= + 8tDw4YN3Ef581PivVYrV70ORdx8vyRZAA7CskAQ1xAk= + 172.0.255.10/32 + + + 30 + + + 1 + wgc3 + rnhKwvKEg22VkPweq0GGEbmBSQZ+WuD4sQ2BAVhodGg= + /3dKqopj1cKOZbafVazm2SEiAQUFb/FnCBWQGns7730= + 172.0.250.11/32 + + + 30 + + + + + + + 1 + wgs1 + 0 + F7hSLFas3x3OWvPsrCZkWbOj6fO2stnoJgZec7YbQkw= + aNz1ufO2AmEbN0xSPEXBdnldilDbU4FObX9KQ5zFtF4= + 5555 + + + 192.168.0.254/29 + 0 + + a2c9e616-2b70-4566-94b7-26982ee82d0e + + + 1 + wgs2 + 1 + o8l2izL6Qib9lQOxy7zVRtnymDqej7z1OIiWEUTCc0M= + eJF3/TXwCGg2zzR9SN7Nd6ZTLxaXlDC6nPLt3y8SPyM= + 5556 + 172.0.255.1/24 + 0 + + 42ab6cec-7f19-41a1-b0cd-47748d68335f,42ab6cec-7f19-41a1-b0cd-47748d68335f + + + + + + diff --git a/test/wireguard-test1.yml b/test/wireguard-test1.yml new file mode 100644 index 0000000..55003c7 --- /dev/null +++ b/test/wireguard-test1.yml @@ -0,0 +1,63 @@ +--- + +opn_wireguard: + general: + enabled: 1 + servers: + "63eedfa6-725c-49e9-9678-1cc36a64bfff": + enabled: 1 + name: wgs1 + instance: 0 + pubkey: "F7hSLFas3x3OWvPsrCZkWbOj6fO2stnoJgZec7YbQkw=" + privkey: "aNz1ufO2AmEbN0xSPEXBdnldilDbU4FObX9KQ5zFtF4=" + port: 5555 + mtu: + dns: + tunneladdress: 192.168.0.254/29 + disableroutes: 0 + gateway: + peers: a2c9e616-2b70-4566-94b7-26982ee82d0e + "20e492fa-0acc-4082-95ad-7aa3dab18e1b": + enabled: 1 + name: wgs2 + instance: 1 + pubkey: o8l2izL6Qib9lQOxy7zVRtnymDqej7z1OIiWEUTCc0M= + privkey: eJF3/TXwCGg2zzR9SN7Nd6ZTLxaXlDC6nPLt3y8SPyM= + port: 5556 + tunneladdress: 172.0.255.1/24 + disableroutes: 0 + gateway: + peers: + - 42ab6cec-7f19-41a1-b0cd-47748d68335f + - 42ab6cec-7f19-41a1-b0cd-47748d68335f + clients: + "a2c9e616-2b70-4566-94b7-26982ee82d0e": + enabled: 1 + name: wgc1 + pubkey: +pW8dSurC0UGBc+LWoGWuQKVbBa56Y/pK4MW1ZwuKXc= + psk: mrbZjO476CVrr9YBTksVJK6ABr5mcTOsME2CaDYqb3g= + tunneladdress: + - 192.168.20.0/24 + - 192.168.255.0/24 + - 192.168.0.253/32 + serveraddress: 192.168.0.242 + serverport: 5555 + keepalive: 30 + "42ab6cec-7f19-41a1-b0cd-47748d68335f": + enabled: 1 + name: wgc2 + pubkey: BWT7WnYwV+86zhf4OAlGYwCZKlvvXrvoP6dd8cYcaAQ= + psk: 8tDw4YN3Ef581PivVYrV70ORdx8vyRZAA7CskAQ1xAk= + tunneladdress: 172.0.255.10/32 + serveraddress: + serverport: + keepalive: 30 + "9c1d12b8-dda5-4a88-9130-8da0b2450016": + enabled: 1 + name: wgc3 + pubkey: rnhKwvKEg22VkPweq0GGEbmBSQZ+WuD4sQ2BAVhodGg= + psk: /3dKqopj1cKOZbafVazm2SEiAQUFb/FnCBWQGns7730= + tunneladdress: 172.0.250.11/32 + serveraddress: + serverport: + keepalive: 30