Compare commits

..

563 Commits
v2 ... v3.17.0

Author SHA1 Message Date
Quentin McGaw
91b037a335 Feature: update hardcoded servers for DNS resolution based VPN providers 2021-05-06 18:51:31 +00:00
Quentin McGaw
d5ef3de64c Feature: more robust updater DNS resolution
- Parallel resolver to resolve multiple hosts
- Repeat resolver to repeat resolution for a single host
- Additional parameters for fault toleration
- Do not update servers if e.g. > 10% DNS resolutions failed
- resolver package in updater package
2021-05-06 18:48:14 +00:00
Quentin McGaw
167a0b0b29 Restart unhealthy (#417) (#441) 2021-05-04 15:36:12 -04:00
Quentin McGaw
954e3c70b2 Feature: Protonvpn support (#437 clone on #434) 2021-04-25 15:44:45 -04:00
Quentin McGaw
b02a80abbd Feature: update PIA server information 2021-04-24 13:54:13 +00:00
Quentin McGaw
04313d3c3b Maintenance: devcontainer changes
- Bind mount for root only
- Support for Windows Hyperv bind mounts
- Run go mod tidy after go mod download
- Use :z flag for possibly shared bind mounts
- Bind mount zsh_history
- Bind mount docker config directory
2021-04-24 13:53:48 +00:00
Quentin McGaw
fb8279f8f0 Fix: remove pull-filter ignore ping-restart 2021-04-19 19:51:00 +00:00
Quentin McGaw
e0e56595c6 Fix: only run ip6tables if it is supported by the Kernel (#431)
- Fix #430
2021-04-19 14:35:29 -04:00
Quentin McGaw
44d8cf9d4e Replace Surfshark default cipher with aes 256 gcm 2021-04-19 18:00:58 +00:00
Quentin McGaw
282c1e53ec Clear firewall rules on shutdown, fix #276 2021-04-19 14:27:38 +00:00
Quentin McGaw
7ba98af1cc Feature/Bugfix: IPv6 blocking (#428)
- Feature/Bugfix: Block all IPv6 traffic with `ip6tables` by default
- Feature: Adapt existing firewall code to handle IPv4 and IPv6, depending on user inputs and environment
- Maintenance: improve error wrapping in the firewall package
2021-04-19 09:24:46 -04:00
Quentin McGaw
d3df5aaa52 Upgrade system and package versions
- Alpine from 3.12 to 3.13 and:
- Openvpn from 2.4.10 to 2.5.1
- Unbound from 1.10.1 to 1.13.0
- Iptables from 1.8.4 to 1.8.6
2021-04-19 00:31:46 +00:00
Quentin McGaw
1c83dcab5e Maintenance: upgrade golangci-lint to 1.39.0 2021-04-19 00:20:43 +00:00
Quentin McGaw
6208081788 Fix: PIA port forwarding (#427)
- Update PIA token URL
- Change base64 decoding to standard decoding
- Add unit tests
- Remove environment variable `GODEBUG=x509ignoreCN=0`
- Fixes #423 
- Fixes #292 
- Closes #264 
- Closes #293
2021-04-17 16:21:17 -04:00
Quentin McGaw
3795e92a82 Hotfix: lint error in Surfshark constants 2021-04-16 22:37:51 +00:00
Quentin McGaw
0636123e7a Feature: add more Surfshark servers
- Add servers missing from surfshark zip file
- Fixes #424 and re-add multihop servers
- Fix logic to try resolving old vpn servers for Surfshark
2021-04-16 22:31:09 +00:00
Michael Robbins
69f9461bcd Fix: restricting route listing to IPv4 only (#419) 2021-04-11 08:50:59 -04:00
Quentin McGaw
d1558a3472 Fix lint error from PR merge 2021-04-09 17:44:22 +00:00
Michael Robbins
8230596f98 Feature: uplift the 'localSubnet' concept to cover all local ethernet interfaces (#413) 2021-04-09 13:08:20 -04:00
Quentin McGaw
cc4117e054 Change PIA settings, refers to #265 2021-04-01 18:53:21 +00:00
Quentin McGaw
a0ddbc037f Update new provider issue template 2021-04-01 18:29:55 +00:00
Quentin McGaw
de82d4e616 Fix: use udp by default for custom openvpn config 2021-03-15 02:13:10 +00:00
Quentin McGaw
fa220f9e93 Feature: custom Openvpn configuration file, fixes #223 (#402) 2021-03-13 08:51:05 -05:00
Quentin McGaw
aca112fa42 CI: Build for all architectures in branches 2021-03-09 00:16:24 +00:00
Quentin McGaw
9f4077d35d Feature: FastestVPN support (#383) 2021-03-05 23:12:19 -05:00
Quentin McGaw
9509b855f1 Feature: PrivateVPN support (#393) 2021-03-05 22:58:57 -05:00
Quentin McGaw
be72f4a046 Feature: Hide My Ass VPN provider support (#401) 2021-03-05 22:45:54 -05:00
Quentin McGaw
8b36ce198f Maintenance: 8.8.8.8 as the cli updater DNS 2021-03-05 22:46:21 +00:00
Quentin McGaw
71de05dc68 Maintenance: updater DNS resolution more resilient 2021-03-05 22:46:14 +00:00
Quentin McGaw
83b5a9457a Maintenance: upgrade golangci-lint to 1.37.0 2021-03-03 01:16:05 +00:00
Quentin McGaw
0b7ada9fd9 Maintenance: use Go 1.16 to build binary 2021-03-03 01:15:14 +00:00
Quentin McGaw
92bcef0b1c Maintenance: unique choices from hardcoded servers 2021-02-26 13:21:55 +00:00
Quentin McGaw
a10c4056d0 Maintenance: simplify env comments in Dockerfile 2021-02-26 13:02:43 +00:00
Quentin McGaw
1fd3ee7149 Maintenance: sort alphabetically providers in code 2021-02-26 12:58:58 +00:00
dependabot[bot]
e3a157bfe1 Maintenance: bump golang/mock from 1.4.4 to 1.5.0 (#394) 2021-02-26 07:39:29 -05:00
Quentin McGaw
b446aa6590 Maintenance: use native HTTP client for updater 2021-02-26 00:42:55 +00:00
Quentin McGaw
c54ee71e1d Maintenance: new logging, shorter with less deps 2021-02-25 23:51:29 +00:00
Quentin McGaw
1748a2ae12 Fix: HTTP proxy password and log settings reading 2021-02-26 03:32:26 +00:00
Quentin McGaw
eff46aa97a Fix firewall settings parsing, fixes #392 2021-02-21 02:39:34 +00:00
Quentin McGaw
9fb186af75 Documentation: update issue templates 2021-02-20 22:29:33 +00:00
Quentin McGaw
f1b1001863 Torguard support (#387)
See discussion on #374
2021-02-17 20:36:30 -05:00
Quentin McGaw
c5af536299 Maintenance: deduplicate PIA servers by protocols 2021-02-16 13:06:58 +00:00
Quentin McGaw
b9b2f691a5 Fix: pia updater for TCP, fixes #388 2021-02-16 13:06:51 +00:00
fgeertsema
bdc8817672 Fix: HTTP proxy: return the response of a redirect, do not follow (#384)
Authored-by: Fernand Geertsema <fernand@web-iq.eu>
2021-02-15 08:40:51 -05:00
Quentin McGaw
a55acb2816 CI: Alpine s390x build removed (periodic crashes) 2021-02-14 18:59:27 +00:00
Quentin McGaw
d686c76db3 Fix: Privado SERVER_HOSTNAME selection 2021-02-14 16:40:48 +00:00
Quentin McGaw
30c1ae651e Documentation: new provider issue template 2021-02-14 16:31:31 +00:00
Quentin McGaw
adaad62fbd Feature: updater: no sleep for last DNS resolution 2021-02-12 21:27:26 +00:00
Quentin McGaw
fe5ec205fc Fix: updater uses plaintext DNS to avoid getting blocked by Unbound (#380) 2021-02-12 14:20:07 -05:00
Quentin McGaw
576400e0d9 Fix: Windscribe SERVER_HOSTNAME, fixes #379 2021-02-12 15:05:35 +00:00
Quentin McGaw
f08a03106f Feature: updater changes to have more VPN IP addresses (#364) 2021-02-11 08:40:25 -05:00
Quentin McGaw
f852b7789e Fix: surfshark: restore ping settings 2021-02-09 03:03:08 +00:00
Quentin McGaw
b0bd06bdc5 Feature: only log health when health state changes 2021-02-09 02:45:50 +00:00
Quentin McGaw
84787f0ea2 Fix: restore nordvpn ping settings, refers to #368 2021-02-09 02:30:39 +00:00
Quentin McGaw
f69b3dbbe6 Fix: Windscribe: TLS keys out of sync (#347)
* Add reneg-sec 0
* Add ncp-disable
2021-02-08 20:49:54 -05:00
Quentin McGaw
ec5ec6f02c Fix: defaults to run openvpn as root 2021-02-08 00:05:54 +00:00
Quentin McGaw
5d681e635b Fix: restore surfshark ping to 15s 2021-02-08 00:05:22 +00:00
Quentin McGaw
3deb65b529 Feature: log out country, region and city of IP 2021-02-08 00:01:14 +00:00
Quentin McGaw
3e527fee8b Fixes #370 (bug introduced) 2021-02-07 18:15:31 +00:00
Quentin McGaw
b1f1f94a76 Maintenance: remove some type aliases 2021-02-06 18:31:14 +00:00
Quentin McGaw
43e140e6cc Fix linting errors 2021-02-06 17:16:58 +00:00
Quentin McGaw
7ca9d445f1 Maintenance: package comments 2021-02-06 16:26:23 +00:00
Quentin McGaw
90aaf71270 Configuration package (#369) 2021-02-06 11:05:50 -05:00
Quentin McGaw
4f2570865c Add pull filter ignore ping restart
- Refers to OpenVPN reports error #368
2021-02-05 03:16:19 +00:00
Quentin McGaw
81556ec2e1 Maintenance: improve DNS settings log 2021-02-01 01:22:46 +00:00
Quentin McGaw
dd5a9c6067 Fix: empty connection for NordVPN and Windscribe 2021-01-31 18:45:58 +00:00
Quentin McGaw
982c50c756 Improve panic message for empty connection 2021-01-31 18:42:58 +00:00
Quentin McGaw
3c7dc9b9ad Feature: Private Internet Access custom port 2021-01-31 01:27:13 +00:00
Quentin McGaw
8f4354936c Fix: remove PureVPN route option (#339) 2021-01-30 19:54:40 -05:00
Quentin McGaw
e50941277f Fix: Alpine to 3.12 for 32 bit compatibility 2021-01-31 00:46:53 +00:00
Quentin McGaw
a72647b925 Feature: update servers information with more IP addresses (#365) 2021-01-30 14:08:14 -05:00
Quentin McGaw
e254849009 Fix: update mechanism for PIA and update servers
- Separate TCP and UDP servers as they have different CNs
- Update server hardcoded information constants
2021-01-30 18:22:15 +00:00
Quentin McGaw
5757f0e201 Fix: Only log subproc error when it's not nil 2021-01-30 18:07:12 +00:00
Quentin McGaw
75fdf7adab Fix: Pass down context to CLI commands 2021-01-30 17:29:27 +00:00
Quentin McGaw
702eafae4c Feature: update Surfshark servers information 2021-01-29 18:53:16 +00:00
Quentin McGaw
4abb8cd87f Add panic checks 2021-01-29 00:32:43 +00:00
Quentin McGaw
5194361f3b Fix public IP on restarts, refers to 359 2021-01-29 00:06:55 +00:00
Quentin McGaw
bc83b75634 (Fix) Lint errors 2021-01-26 01:09:09 +00:00
Quentin McGaw
b1ff95affa Maintenance: Fix exit race condition 2021-01-26 01:04:15 +00:00
Quentin McGaw
a243d48fb1 Maintenance: improve stream merging 2021-01-26 04:17:22 +00:00
Quentin McGaw
937d09f1c3 CI: Fix publish job CI 2021-01-23 16:58:46 +00:00
dependabot[bot]
3769092888 Bump github.com/stretchr/testify from 1.6.1 to 1.7.0 (#344) 2021-01-23 11:25:08 -05:00
Quentin McGaw
75281dee07 CI: remove risv64 as Alpine does not support it 2021-01-23 16:22:28 +00:00
Quentin McGaw
26a7c5eaef Feature: openvpn exits on TLS error 2021-01-22 13:36:56 +00:00
Quentin McGaw
1e8254fabf CI: Update golangci-lint to v1.35.2 2021-01-22 13:32:47 +00:00
Quentin McGaw
43b6509b43 Feature: upgrade to Alpine 3.13 2021-01-22 13:32:05 +00:00
Quentin McGaw
204c5b2446 Feature: add 10s ping with 60s exit ping for all 2021-01-22 13:30:06 +00:00
Quentin McGaw
7ab3347604 CI: Remove duplicate COPY in Dockerfile 2021-01-22 13:21:42 +00:00
Quentin McGaw
2f24a79d4d CI: Go mod tidy check 2021-01-22 13:20:54 +00:00
Quentin McGaw
819b1fe0f6 CI: Merge workflows in build.yml 2021-01-22 13:19:45 +00:00
Quentin McGaw
9f04b2d56c (fix) Update Nordvpn servers timestamp 2021-01-20 03:50:38 +00:00
Quentin McGaw
5eff5fac67 Update Nordvpn servers list 2021-01-20 03:44:55 +00:00
Quentin McGaw
d033d08c4d Maintenance: unit tests utils in provider package 2021-01-20 03:36:36 +00:00
Quentin McGaw
25644d061e Fix build (lint error) 2021-01-19 14:20:57 +00:00
Quentin McGaw
e7372f22cb Feature: OPENVPN_MSSFIX variable 2021-01-19 02:55:38 +00:00
Quentin McGaw
4530dd4fea Maintenance: OpenVPN BuildConf arity reduced 2021-01-19 02:42:16 +00:00
Quentin McGaw
072528af83 CI: Dockerfile fixes
- Pin xcputranslate version
- Update xcputranslate usage
- Set default BUILDPLATFORM to linux/amd64
2021-01-18 00:58:47 +00:00
Quentin McGaw
2c4d577f23 Maintenance: Update golibs and update params 2021-01-10 23:06:09 +00:00
Quentin McGaw
edd67e3473 Remove pull_request_target based workflow 2021-01-08 03:13:40 +00:00
Quentin McGaw
f389642dba Maintenance: Improve Go devcontainer settings 2021-01-08 02:27:48 +00:00
Quentin McGaw
b8690c7f83 CI: Change microbadger hook to gluetun 2021-01-08 02:25:41 +00:00
Quentin McGaw
06b809a492 Maintenance: Improve .dockerignore 2021-01-08 02:24:31 +00:00
Quentin McGaw
2ceda2faaa Documentation: Move sections to Wiki 2021-01-08 02:24:15 +00:00
Quentin McGaw
c7fc3afc21 Fix: DNS_KEEP_NAMESERVER behavior 2021-01-06 21:52:55 +00:00
Quentin McGaw
af57043afd Add docker and gomod to dependabot config 2021-01-06 04:23:09 +00:00
Quentin McGaw
4a85f3660c CI: Further reworking of workflows 2021-01-06 04:22:56 +00:00
dependabot[bot]
69713f34b2 CI: Bump crazy-max/ghaction-github-labeler from v1 to v3.1.1 (#335) 2021-01-05 22:41:01 -05:00
Quentin McGaw
55801597c6 Feature: Supports s390x and ppc64le 2021-01-06 01:31:04 +00:00
Quentin McGaw
ff3cc98d46 Maintenance: dependabot monitoring of Actions 2021-01-06 01:28:52 +00:00
Quentin McGaw
79489796ae CI: Add QEMU setup before buildx 2021-01-06 06:23:03 +00:00
Quentin McGaw
8e495494fd CI: Faster builds with buildx and xcputranslate 2021-01-06 06:10:42 +00:00
Quentin McGaw
1abb716bb6 Maintenance: Fix test data race 2021-01-06 06:09:19 +00:00
Quentin McGaw
3f012dd7a3 CI: rework Github build workflows and Dockerfile 2021-01-06 06:02:31 +00:00
Quentin McGaw
bf6bab7963 (Fix): Exit code 0 when expected (healthcheck fix) 2021-01-04 13:41:56 +00:00
Quentin McGaw
9db10f56ef Maintenance: remove vscode workspace directory 2021-01-04 03:50:31 +00:00
Quentin McGaw
3b91e351b7 Maintenance: using channels instead of wrap functions 2021-01-04 01:49:05 +00:00
Quentin McGaw
657937d272 Maintenance: Add waitgroup to collectStreamLines 2021-01-04 01:46:50 +00:00
Quentin McGaw
d294fbab15 Bug fix: Unbound log line processing, fix #333 2021-01-04 01:44:24 +00:00
Quentin McGaw
cfbf5624e1 Maintenance: rework main function 2021-01-04 01:40:07 +00:00
Quentin McGaw
c833e9a1a8 CI: Remove microbadger web hook for buildx branch and release 2021-01-03 04:03:13 +00:00
Quentin McGaw
f1b261163b Fix DNS_KEEP_NAMESERVER behavior 2021-01-03 03:52:07 +00:00
Quentin McGaw
4553240601 Feature: Improve DNS settings start log 2021-01-03 00:51:47 +00:00
Quentin McGaw
007a4536c7 Code: Access control subnets settings for Unbound 2021-01-03 00:36:03 +00:00
Quentin McGaw
31cf5d4a5a Fix #331 (DNS ready signaling fixed) 2021-01-02 23:51:05 +00:00
Quentin McGaw
3e3bd05c79 CI: Only test and lint on amd64 builds 2021-01-02 23:46:30 +00:00
Quentin McGaw
20deaf2950 Bug fix: DNS setup failure loop behavior 2021-01-02 20:39:43 +00:00
Quentin McGaw
680aef62ee (Bug fix): Fix Unbound
- Set binary filepath
- Set ca certs filepath
2021-01-02 20:39:24 +00:00
Quentin McGaw
f5eb4887a7 (Bug fix): DOT provider check 2021-01-02 19:24:01 +00:00
Quentin McGaw
dc3452c5b7 Feature: Log passed after healthcheck succeeds after a failure 2021-01-02 18:36:15 +00:00
Quentin McGaw
a67efd1ad1 Code maintenance: Using qdm/dns and qdm12/updated 2021-01-02 18:31:39 +00:00
Quentin McGaw
5dcbe79fa8 Move OS package to golibs 2021-01-02 01:57:00 +00:00
Quentin McGaw
574ac9a603 Maintenance: update buildx Github workflow to v3 2021-01-01 20:46:52 +00:00
Quentin McGaw
6871444728 Change: remove decomissioned SecureDNS option 2021-01-01 20:45:11 +00:00
Quentin McGaw
f4db7e3e53 Change: remove LibreDNS, it does'nt support DNSSEC 2021-01-01 20:44:01 +00:00
Quentin McGaw
da92b6bfb9 Bug fix: Privado server selection 2020-12-31 21:57:26 +00:00
Quentin McGaw
d713782fe1 Change: Use SERVER_HOSTNAME instead of HOSTNAME 2020-12-31 21:50:28 +00:00
Quentin McGaw
02cde5f50b Code maintenance: consistent proto type conversion 2020-12-31 21:39:34 +00:00
Quentin McGaw
c5a7a83d3a Bug fix: do not fail if servers.json is empty 2020-12-31 21:19:29 +00:00
Quentin McGaw
6655a1a5e6 Bug fix: Update hardcoded Purevpn server data
- Refers to #320
2020-12-31 21:07:49 +00:00
Quentin McGaw
b8cb181070 Bug fix: PureVPN updater from ZIP files
- Fix #317
- Refers to #320
2020-12-31 21:07:30 +00:00
Quentin McGaw
a56471fe73 Code maintenance: rework ovpn host extraction 2020-12-31 20:35:49 +00:00
Quentin McGaw
8c769812ae Documentation: minor readme improvements 2020-12-31 04:49:18 +00:00
Quentin McGaw
f7a842e4ee Documentation: readme sections moved to Wiki 2020-12-31 04:40:04 +00:00
Quentin McGaw
23c0334f68 Documentation: Add visitors count to readme 2020-12-31 03:49:01 +00:00
Quentin McGaw
e2ee7a0408 Documentation: minor issue template update 2020-12-31 03:00:15 +00:00
Quentin McGaw
8f862b3df7 Bug fix: Remove trail newline from secrets
- Fix #330
2020-12-31 02:03:51 +00:00
Quentin McGaw
ae1f91a997 Documentation: Update Docker image labels 2020-12-30 22:30:59 +00:00
Quentin McGaw
d4fb76770f Documentation: Moare badges and metadata 2020-12-30 22:29:18 +00:00
Quentin McGaw
ea28c791e6 Code maintenance: http proxy starts from Run func 2020-12-30 22:02:47 +00:00
Quentin McGaw
251555f859 Code maintenance: Shadowsocks loop refactor 2020-12-30 22:01:08 +00:00
Quentin McGaw
fa7bda7ee4 Code maintenance: remove unneeded defaultInterface in Shadowsocks 2020-12-30 21:43:45 +00:00
Quentin McGaw
f385c4203a Bug fix: truncate /etc/resolv.conf, fixing DNS
- Refers to #326
- Refers to #329
2020-12-30 20:48:41 +00:00
Quentin McGaw
1e4243dedb Bug fix: Stop DOT if disabled by new settings 2020-12-30 20:38:59 +00:00
Quentin McGaw
5f78ee7b79 Bug fix: missing mutex Unlock in DNS set settings 2020-12-30 20:37:14 +00:00
Quentin McGaw
c6eb5c1785 Bug fix: Plaintext DNS fix (#326, #329) 2020-12-30 20:36:19 +00:00
Quentin McGaw
11338b6382 Feature: faster healthcheck, fix #283 2020-12-30 19:34:11 +00:00
Quentin McGaw
6f3a074e00 Code maintenance: HTTP proxy loop reworked
- Blocking method calls on loop
- Restart proxy when settings change
- Detect server crash error and restart it
2020-12-30 18:44:46 +00:00
Quentin McGaw
e827079604 Code maintenance: updater loop waitgroup 2020-12-30 18:32:58 +00:00
Quentin McGaw
cf66db8d4b Bug fix: Stopping updater loop deadlock 2020-12-30 18:29:28 +00:00
Quentin McGaw
25acbf8501 Feature: Increasing backoff time for crashes
- Fix #247
2020-12-30 17:22:54 +00:00
Quentin McGaw
e4c7a887d2 Bug fix: healthcheck uses DOT via default resolver 2020-12-30 16:43:08 +00:00
Quentin McGaw
fb8a615660 Feature: Update PIA servers using v5 PIA API 2020-12-30 15:54:13 +00:00
Quentin McGaw
1d9d49f406 Bug fix: Privado settings log 2020-12-30 15:34:07 +00:00
Quentin McGaw
0069b59ffe Change: remove redundant dns over tls log 2020-12-30 15:29:40 +00:00
Quentin McGaw
d4ba1b1e09 Bug fix: larger timeout for healtcheck 2020-12-30 15:24:46 +00:00
Quentin McGaw
3a20b84f3a Documentation: readme changes
- Remove videos section (outdated)
- Add quick links section for help and support
- Simplify support section
2020-12-29 23:00:55 +00:00
Quentin McGaw
d52fc777ac Code maintenance: update dockerhub readme workflow 2020-12-29 22:46:44 +00:00
Quentin McGaw
5753a428d8 Documentation: announcement on newer image name 2020-12-29 22:46:18 +00:00
Quentin McGaw
85afef5775 Change: gluetun docker image name 2020-12-29 22:10:44 +00:00
Quentin McGaw
b4fc24995c Code maintenance: Microbadger hook uses continue-on-error 2020-12-29 21:35:09 +00:00
Quentin McGaw
5917bb10e4 Feature: Docker secrets, refers to #306 2020-12-29 20:47:56 +00:00
Quentin McGaw
258e150ebf Code maintenance: GetPassword signature changed 2020-12-29 20:06:24 +00:00
Quentin McGaw
96f2b2b617 Change: PASSWORD changed to OPENVPN_PASSWORD 2020-12-29 20:05:17 +00:00
Quentin McGaw
d556db079b Change: USER changed to OPENVPN_USER 2020-12-29 20:02:58 +00:00
Quentin McGaw
a811a82329 Change: Remove CLIENT_KEY variable 2020-12-29 19:54:58 +00:00
Quentin McGaw
d17a0dae1f Documentation: Missing PUID and PGID update 2020-12-29 19:46:41 +00:00
Quentin McGaw
ef40f2f91b Code maintenance: Use Unset() option for params 2020-12-29 18:29:21 +00:00
Quentin McGaw
a921f9848c Code maintenance: CLI interface abstraction 2020-12-29 18:24:03 +00:00
Quentin McGaw
95ba3261fd Code maintenance: lint bug fix for armv7 2020-12-29 18:16:29 +00:00
Quentin McGaw
fe81eb65c2 Bug fix: Program exit on Openvpn fatal error 2020-12-29 17:50:36 +00:00
Quentin McGaw
8428714cf5 Code maintenance: upgrade golangci-lint to 1.34.1 2020-12-29 17:50:12 +00:00
Quentin McGaw
bedf613cff Code maintenance: storage merging reworked 2020-12-29 17:49:38 +00:00
Quentin McGaw
e643ce5b99 Fix publicip and updater loops exit bugs 2020-12-29 16:44:55 +00:00
Quentin McGaw
cb64302294 Rename UID and GID to PUID and PGID 2020-12-29 16:44:35 +00:00
Quentin McGaw
8d5f2fec09 Code maintenance: use native Go HTTP client 2020-12-29 02:55:34 +00:00
Quentin McGaw
60e98235ca Code maintenance: Better deps injection in main.go 2020-12-29 01:21:54 +00:00
Quentin McGaw
f55fb4055f Code maintenance: OS user abstraction interface 2020-12-29 01:16:53 +00:00
Quentin McGaw
da4e410bb7 Upgrade direct dependencies 2020-12-29 01:06:08 +00:00
Quentin McGaw
cdd1f87437 Code maintenance: Remove unneeded ctrl.Finish() 2020-12-29 01:04:07 +00:00
Quentin McGaw
7058373916 Code maintenance: Unix abstraction interface
- Used for creating the tun device if it does not exist
- Mocks generated for testing
2020-12-29 01:02:47 +00:00
Quentin McGaw
8dd38fd182 Code maintenance: better JSON decoding for HTTP 2020-12-29 00:56:51 +00:00
Quentin McGaw
73479bab26 Code maintenance: OS package for file system
- OS custom internal package for file system interaction
- Remove fileManager external dependency
- Closer API to Go's native API on the OS
- Create directories at startup
- Better testability
- Move Unsetenv to os interface
2020-12-29 00:55:31 +00:00
Quentin McGaw
f5366c33bc Remove unneeded .Times(1) for unit tests mocks 2020-12-28 01:52:30 +00:00
Quentin McGaw
db886163c2 Public IP getter loop refactored 2020-12-28 01:51:55 +00:00
Quentin McGaw
91f5338db0 Fix updater loop bug 2020-12-28 01:50:13 +00:00
Quentin McGaw
82a02287ac Public IP endpoint with GET /ip fixing #319 2020-12-27 21:06:00 +00:00
Quentin McGaw
2dc674559e Re-use username for UID if it exists 2020-12-27 00:36:39 +00:00
Quentin McGaw
38e713fea2 Fix Block-outside-dns #316 2020-12-23 06:46:54 +00:00
Quentin McGaw
2cbb14c36c Fix Purevpn settings display, refers to #317 2020-12-22 14:08:12 +00:00
Quentin McGaw
610e88958e Upgrade golangci-lint to v1.33.0 2020-12-22 13:52:37 +00:00
Quentin McGaw
bb76477467 Fix #316 2020-12-22 13:49:49 +00:00
Quentin McGaw
433a799759 Fix environment variables table for Purevpn 2020-12-22 13:46:52 +00:00
Quentin McGaw
22965ccce3 Fix #315 2020-12-22 06:21:25 +00:00
Quentin McGaw
4257581f55 Loops and HTTP control server rework (#308)
- CRUD REST HTTP server
- `/v1` HTTP server prefix
- Retrocompatible with older routes (redirects to v1 or handles the requests directly)
- DNS, Updater and Openvpn refactored to have a REST-like state with new methods to change their states synchronously
- Openvpn, Unbound and Updater status, see #287
2020-12-19 20:10:34 -05:00
Quentin McGaw
d60d629105 Dev container documentation and cleanup 2020-12-08 06:24:46 +00:00
Quentin McGaw
3f721b1717 Simplify Github workflows triggers 2020-12-07 02:15:50 +00:00
Quentin McGaw
97049bfab4 Add 256x256 png logo for Unraid 2020-12-07 02:11:23 +00:00
Quentin McGaw
84944a87d3 HTTP proxy authentication fixes (#300)
- Only accepts HTTP 1.x protocols
- Only checks the credentials when the method is `CONNECT` or the request URL is absolute
- More logging on authorization failures
- Removes the authorization headers before forwarding the HTTP(s) requests
- Refers to #298
2020-12-01 22:29:31 -05:00
Quentin McGaw
fb62910b17 HTTP proxy 24 hours timeout, fix #303 2020-11-21 01:26:02 +00:00
Quentin McGaw
1cc0f5fee9 Fix #296 (Cyberghost implementation) (#297)
* Reads the client key from /gluetun/client.key
* Read the client certificate from /gluetun/client.crt
* Additional checks for client key and client certificate validity
* Fix client key file parsing if environment variable isn't present
2020-11-19 08:50:55 -05:00
Quentin McGaw
6896cf4258 Update PIA hardcoded servers information 2020-11-14 22:21:08 +00:00
Quentin McGaw
188d63c6b8 Fix #298 2020-11-13 01:14:05 +00:00
Quentin McGaw
cbc5d466f6 Fix Shadowsocks UDP logs 2020-11-13 00:42:14 +00:00
Quentin McGaw
aef14a9f6d Assimilate PIA v4 as PIA in code 2020-11-10 13:35:49 +00:00
Quentin McGaw
f48392064e Update issue templates 2020-11-10 01:29:47 +00:00
Quentin McGaw
994bdd0ca7 Update Gituhb labels 2020-11-10 01:16:12 +00:00
Quentin McGaw
40ed070f21 Filter Privado servers by hostnames only 2020-11-09 23:17:22 +00:00
Quentin McGaw
f1e4b9937b Privado support, fix #285 (#288) 2020-11-08 20:56:49 -05:00
Quentin McGaw
0423388b52 Fix build information setting at build time 2020-11-07 22:31:20 +00:00
Quentin McGaw
096a9c5fc0 Fix #289 2020-11-06 02:54:27 +00:00
Quentin McGaw
7518f74729 Refactor HTTP control server code 2020-11-05 22:26:53 +00:00
Quentin McGaw
854401a150 PureVPN servers json tag fix 2020-11-05 02:22:33 +00:00
Quentin McGaw
a7a7efe9c3 Remove PIA v3 servers support 2020-11-05 02:10:34 +00:00
Quentin McGaw
31883f9adb Windscribe API and more servers filter options, fixes #197 (#282)
- Use Windscribe API to fetch servers information
- More data on servers about region, city and hostname
- Add optional server filters with `REGION`, `CITY` and `HOSTNAME` csv environment variables
2020-11-04 20:38:35 -05:00
Quentin McGaw
3b04677f8f HTTP control server /version endpoint 2020-11-04 14:07:04 +00:00
Quentin McGaw
b5fb2b849a DOT listens on all interfaces, refers to #281 2020-11-04 03:14:27 +00:00
Quentin McGaw
0c9f74ffa4 HTTP proxy written in Go to replace Tinyproxy (#269) 2020-10-31 21:50:31 -04:00
Quentin McGaw
58da55da1e Retrocompatiblity with EXTRA_SUBNETS key 2020-10-29 23:32:15 +00:00
Quentin McGaw
db64dea664 Fix #273 (#277), adding FIREWALL_OUTBOUND_SUBNETS 2020-10-29 19:23:44 -04:00
Quentin McGaw
f7bff247aa Fix #275 2020-10-28 22:09:58 +00:00
Quentin McGaw
edc08c46d4 Health server runs on 127.0.0.1:9999, fix #272 2020-10-27 03:28:25 +00:00
Quentin McGaw
78d83145ba Increase http timeout to 30s for piav4
- Refers to #271
2020-10-26 21:53:18 +00:00
Quentin McGaw
0c81154f36 No firewall setup needed for Shadowsocks 2020-10-26 02:52:10 +00:00
Quentin McGaw
53fe08ea26 Fix Mullvad CSV city bug 2020-10-25 21:13:26 +00:00
Quentin McGaw
a6cb1a7052 Remove x/net Go dependency 2020-10-25 20:45:14 +00:00
Quentin McGaw
c64fe7e45d Routing: use 0.0.0.0/0 instead of nil 2020-10-25 20:41:09 +00:00
Quentin McGaw
a062135148 Add routing verbose option in code 2020-10-25 20:40:17 +00:00
Quentin McGaw
5ae7c15211 Unused shadowsocks code cleanup 2020-10-25 20:38:16 +00:00
Quentin McGaw
f29707fa9f Remove unneeded openvpn remote-random 2020-10-24 22:26:15 +00:00
Quentin McGaw
e97d1e4a9a Set default for DOT_CACHING in code 2020-10-24 22:24:20 +00:00
Quentin McGaw
ed4fcc17b3 Routing improvements (#268)
- Fixes #82 
- Remove `EXTRA_SUBNETS`
- Remove no longer needed iptables rules
- Reduce routing interface arity
- Routing setup is done in main.go instead of in the firewall
- Routing setup gets reverted at shutdown
2020-10-24 18:05:11 -04:00
Quentin McGaw
716eb14da1 Allow empty string for CSV variables with golibs 2020-10-24 19:09:54 +00:00
Quentin McGaw
f92489f99b Fix Nordvpn number empty string allowance 2020-10-24 18:45:44 +00:00
Quentin McGaw
ea3b3bc8a3 Netlink Go library to interact with IP routes (#267) 2020-10-22 18:55:28 -04:00
Quentin McGaw
a80cb8f9ba VSCode development container changes
- SSH directory bind mounted as read write
- Remove linters list from devcontainer, use workspace ones instead
2020-10-22 03:54:18 +00:00
Quentin McGaw
d4813ba21c Fix #265 and refers to #256
- Logs a message about auth failure for PIA v4 servers
2020-10-22 00:36:12 +00:00
Quentin McGaw
bf92008e45 Fix #263 2020-10-20 18:13:59 +00:00
Quentin McGaw
9c73faaaeb Add linters and fix lint issues 2020-10-20 02:45:28 +00:00
Quentin McGaw
f9bef8ecda Fix #102 2020-10-19 00:28:07 +00:00
Quentin McGaw
302adb26d7 Fix servers filtering for PIA 2020-10-18 23:44:16 +00:00
Quentin McGaw
af606463ea Multi options filters, fixes #231 (#262)
* OWNED environment variable for Mullvad
* CSV are now accepted for all servers filtering environment variables
2020-10-18 17:15:42 -04:00
Quentin McGaw
c932f48a95 Fixes #254 new variable FIREWALL_INPUT_PORTS (#260) 2020-10-18 09:22:28 -04:00
Quentin McGaw
84c1f46ae4 Upgrade dependencies
- Use of context for custom http client
- Remove unused nodeid for logger
- Upgrade shadowsocks dependency
2020-10-18 02:24:34 +00:00
Quentin McGaw
b27e637894 HTTP_CONTROL_SERVER_LOG variable, fixes #249 2020-10-17 22:21:20 +00:00
Quentin McGaw
4da9607b4d Do not log healthcheck HTTP requests 2020-10-17 22:17:08 +00:00
Quentin McGaw
8abc22977c Fix #261 add variable HTTP_CONTROL_SERVER_PORT 2020-10-17 22:07:15 +00:00
Quentin McGaw
6f4be72785 Using context for HTTP requests 2020-10-17 21:54:09 +00:00
Quentin McGaw
0d2ca377df PIA port forwarding final fixes (#259)
- Returns an error if the server does not support port forwarding
- TLS verification using the server common name obtained through the API
- Updated readme
- Fixes #236
2020-10-15 22:53:13 -04:00
Quentin McGaw
98f778c3bb Improve timing behavior of ticking in loops 2020-10-15 23:20:36 +00:00
Quentin McGaw
9b9ae69404 Repurpose OPENVPN_TARGET_IP for #229 2020-10-12 20:21:26 +00:00
Quentin McGaw
1c747a10c8 Fix CN data for PIA v4 servers 2020-10-12 19:34:36 +00:00
Quentin McGaw
c4354871f7 Single connection written to openvpn configuration (#258)
- From now only a single OpenVPN connection is written to the OpenVPN configuration file
- If multiple connections are matched given the user parameters (i.e. city, region), it is picked at pseudo random using the current time as the pseudo random seed.
- Not relying on Openvpn picking a random remote address, may refer to #229 
- Program is aware of which connection is to be used, in order to use its matching CN for port forwarding TLS verification with PIA v4 servers, see #236 
- Simplified firewall mechanisms
2020-10-12 15:29:58 -04:00
Quentin McGaw
9f6450502c Obtain PIA v4 server information from API (#257)
- Obtain CN for port forwarding https verification
- Obtain for each server if they support port forwarding
- Obtain for each server their IP address for openvpn UDP and openvpn TCP (one for each)
- Updater program updated to use API
- Hardcoded values updated for PIA v3 and v4 servers
- Clearer separation between pia v3 and v4
- Fixes #250
2020-10-12 13:57:45 -04:00
Quentin McGaw
ae7fc5fe96 Fix guard pattern for max parallel DNS requests 2020-10-12 17:35:46 +00:00
Quentin McGaw
ec157f102b PIA nextgen portforward (#242)
* Split provider/pia.go in piav3.go and piav4.go
* Change port forwarding signature
* Enable port forwarding parameter for PIA v4
* Fix VPN gateway IP obtention
* Setup HTTP client for TLS with custom cert
* Error message for regions not supporting pf
2020-10-12 10:55:08 -04:00
Quentin McGaw
fbecbc1c82 Fix updater guard pattern (#255) 2020-10-01 17:56:14 -04:00
Quentin McGaw
ecf76896a2 Mullvad: configurable ipv6 tunneling (#253)
- Disabled by default
- Wiki pages updated
- Readme updated
2020-09-26 09:33:24 -04:00
Quentin McGaw
ae876b93d7 Update readme Wiki links 2020-09-25 23:12:34 +00:00
Quentin McGaw
606f2cffce Fix Shadowsocks documentation, fixing #245 2020-09-18 19:56:53 +00:00
Quentin McGaw
564d9cbf90 Faster servers information updater (#248)
* Asynchronous repeatResolve
* Parallel cyberghost and PIA (v3) processing, with a 10 goroutines limit
* Add missing vyprvpn cli flag to updater
* Increase DNS repetitions to 5 in order to obtain more IP addresses
* Update old PIA IP addresses
* Add Surfshark servers by API (unused for now)
2020-09-18 15:52:28 -04:00
Quentin McGaw
c5b5ae9ca7 Add warning logs when openvpn cannot connect 2020-09-18 14:28:14 +00:00
Quentin McGaw
4e0bd46dd5 Updated Mullvad servers information 2020-09-18 14:16:17 +00:00
Quentin McGaw
f9b6e854b1 Fix surfshark updater and update server data 2020-09-13 00:41:31 +00:00
Quentin McGaw
1fc1776dbf Simplify main.go 2020-09-12 19:17:19 +00:00
Quentin McGaw
464c7074d0 Get public IP and version only when DNS is ready 2020-09-12 18:50:42 +00:00
Quentin McGaw
cb1520cb18 Write 200 http status codes to restart routes 2020-09-12 18:37:06 +00:00
Quentin McGaw
e0e450ca1c Revisit waitgroup (#241)
* Fix Add to waitgroup out of goroutines calling wg.Done()
* Pass waitgroup to other loop functions
2020-09-12 14:34:15 -04:00
Quentin McGaw
1c012e4c92 Minor readme changes
- Mullvad ipv6 startup error fix
- VPNSP variable in docker run example command
2020-09-12 18:06:52 +00:00
Quentin McGaw
78ce272bd0 Minor Dockerfile changes 2020-09-12 18:06:10 +00:00
Quentin McGaw
a19efbd923 Updater loop with period and http route (#240)
* Updater loop with period and http route
* Using DNS over TLS to update servers
* Better logging
* Remove goroutines for cyberghost updater
* Respects context for servers update (quite slow overall)
* Increase shutdown grace period to 5 seconds
* Update announcement
* Add log lines for each provider update start
2020-09-12 14:04:54 -04:00
Quentin McGaw
ee64cbf1fd Use IP addresses resolved for PIA old servers (#239)
- Fix #238
- Not using raw IPs from PIA as they seem invalid
- Update PIA old server information
2020-09-10 21:09:16 -04:00
Quentin McGaw
5b3cbb6906 Fix #235: DNS over TLS log messages 2020-09-09 21:44:50 +00:00
Quentin McGaw
443c7e36d7 Youtube videos added 2020-09-09 20:52:22 +00:00
Max Isom
22b389b6f8 Fix firewall reference to Wiki (#237) 2020-09-09 16:45:36 -04:00
Quentin McGaw
797fa33971 Servers updater (#232)
* Support for all VPN providers
* Update all VPN providers servers information
* Remove old tooling binaries
2020-09-05 12:57:16 -04:00
Quentin McGaw
9dcc00900e Healthcheck moved to HTTP control server 2020-08-31 01:57:45 +00:00
Quentin McGaw
7c102c0028 Fix #135 2020-08-30 14:48:57 +00:00
Quentin McGaw
aac5274eab Fix #224 2020-08-29 19:14:52 +00:00
Quentin McGaw
049bc5b226 Mullvad updater (#228)
* Add Mullvad to updater cli
* Update hardcoded servers for Mullvad
2020-08-29 13:19:34 -04:00
Quentin McGaw
d463e4cb69 New PIA servers support (#227)
* Adapt storage: SyncServers write to file option, export FlushToFile
* CLI built-in updater for old and new PIA servers
* Update hardcoded IP addresses for PIA old and new servers
* Add PIA old to allServers struct and update timestamps
* Adapt code to work with new and old PIA servers
* Remove PIA subdomains (unneeded) from resolver tool
2020-08-28 08:17:04 -04:00
Quentin McGaw
99ba56f574 Fix server filtering using merged server data 2020-08-27 23:06:28 +00:00
Quentin McGaw
93aaf1ab02 Fix exiting without fatalOnError function 2020-08-27 22:59:58 +00:00
Quentin McGaw
aa9693a84d Persistent server pools (#226)
* GetAllServers with version & timestamp tests
* Storage package to sync servers
* Use storage Sync to get and use servers
2020-08-25 19:38:50 -04:00
Quentin McGaw
6fc2b3dd21 Mullvad servers do not have a default port
- Refers to #218
- Checks for custom port value depending on protocol
- Remove default port from server constants
- Use 443 and 1194 ports respectively for tcp and udp
2020-08-24 01:53:24 +00:00
hyness
7e3e6f166a Add new PIA servers hostnames to resolver tool (#222)
Refers to #216
2020-08-20 19:20:59 -04:00
Quentin McGaw
c614a192a4 Shadowsocks in Go (#220), fixes #211 2020-08-20 19:19:54 -04:00
Quentin McGaw
b10a476622 Default status file base directory /tmp/gluetun 2020-08-18 01:08:24 +00:00
Quentin McGaw
15ddbdefef Bump versions and binary build changes
- Go version 1.15
- Golangci-lint 1.30
- Trim path of binary built
2020-08-17 20:39:49 -04:00
Quentin McGaw
78323f0a33 Update PIA IP addresses, fixes #215 2020-08-08 16:27:51 +00:00
Quentin McGaw
cd60fe4406 Add PIA US Dallas region, refers to #212 2020-07-28 02:40:38 +00:00
Quentin McGaw
a2a9410053 Fix #212 2020-07-28 00:31:19 +00:00
Quentin McGaw
f95f6201b1 Rename repo to Gluetun, refers to #112 2020-07-26 12:07:06 +00:00
Quentin McGaw
90e5742211 Reduce readme size 2020-07-25 11:55:35 -04:00
Quentin McGaw
8f547500d0 Purevpn support (#208)
Fixes #192
2020-07-25 11:19:45 -04:00
Quentin McGaw
0811b8b099 Server filtering fixes for Mullvad and Nordvpn 2020-07-23 02:16:12 +00:00
Quentin McGaw
c5c53a2ff8 FatalOnError fixes 2020-07-23 02:15:37 +00:00
Quentin McGaw
0ce129b63d Make all variables behave like server filters 2020-07-23 01:48:18 +00:00
Quentin McGaw
fec1249293 Uniformize server selection filtering 2020-07-23 01:46:28 +00:00
Quentin McGaw
a5c35455d1 Update PIA IP addresses 2020-07-20 02:32:02 +00:00
Quentin McGaw
28e0abc922 FIREWALL_VPN_INPUT_PORTS variable, fixes #196 2020-07-20 02:07:13 +00:00
Quentin McGaw
a13be8f45e Firewall simplifications
- Only a map of allowed input port to interface
- port forwarded is in the map of allowed input ports
- port forwarded has the interface tun0 in this map
- Always allow tcp and udp for allowed input ports
- Port forward state is in openvpn looper only
- Shadowsocks input port allowed on default interface only
- Tinyproxy input port allowed on default interface only
2020-07-20 00:39:59 +00:00
Quentin McGaw
85bd4f2e8d Get default route and local subnet only at start 2020-07-20 00:35:53 +00:00
Quentin McGaw
4baf0420d6 Openvpn get settings http route 2020-07-19 14:26:24 +00:00
Quentin McGaw
29f74df450 Fix #202 2020-07-19 14:22:23 +00:00
Quentin McGaw
fab9939b26 Simplify DNS loop a bit and fixes #199 2020-07-17 01:16:49 +00:00
Quentin McGaw
b4a4e441c1 Fix #199 when ticker period is 0 2020-07-16 12:00:25 +00:00
Quentin McGaw
e8526141be Fix issues in readme 2020-07-16 01:52:09 +00:00
Quentin McGaw
9abb630692 Get and set settings for DNS 2020-07-16 01:45:05 +00:00
Quentin McGaw
9b92ece5a1 Fix race condition for public ip loop 2020-07-16 01:44:48 +00:00
Quentin McGaw
87a3e54044 Set and get settings for openvpn 2020-07-16 01:26:37 +00:00
Quentin McGaw
76b730e2a6 Improve openvpn logging
- Show Initialization Sequence completed in green
- Show all other openvpn logs in the openvpn color
2020-07-16 01:20:47 +00:00
Quentin McGaw
51af8d1ab0 PUBLICIP_PERIOD environment variable 2020-07-16 01:12:54 +00:00
Quentin McGaw
002ffacd35 Shadowsocks get and set settings 2020-07-16 00:05:00 +00:00
Quentin McGaw
404cee9371 Tinyproxy set and get settings 2020-07-16 00:05:00 +00:00
Quentin McGaw
f89e7aa8dc Update readme list of VPN providers supported 2020-07-16 00:04:58 +00:00
Quentin McGaw
a0312ec916 Shadowsocks and Tinyproxy Start and Stop 2020-07-16 00:04:15 +00:00
Quentin McGaw
83cf59b93e Start and Stop for dns over tls 2020-07-16 00:04:15 +00:00
Quentin McGaw
ad5de13c25 Logging filtering for openvpn process 2020-07-16 00:04:14 +00:00
Quentin McGaw
1281026850 Nordvpn support (#189), fix #178 2020-07-15 18:14:45 -04:00
Quentin McGaw
616ba0c538 Replace explicit channels with functions 2020-07-15 01:34:46 +00:00
Quentin McGaw
8c7c8f7d5a Fix Cyberghost port, fixes #179 and #104 2020-07-14 23:08:57 +00:00
Quentin McGaw
78877483e9 Fix #198 2020-07-14 22:31:15 +00:00
Quentin McGaw
de7f12d958 Gluetun git history video 😉 2020-07-14 00:38:55 +00:00
Quentin McGaw
7e7312459d Cyberghost: read client key as file, see #179 2020-07-14 00:17:31 +00:00
Quentin McGaw
e3a677c22b Add openvpnconfig command, for #179 2020-07-13 23:43:26 +00:00
Quentin McGaw
2f955e0190 Simplified provider object creation 2020-07-13 23:34:03 +00:00
Quentin McGaw
618441b008 Vyprvpn support, fix #181 (#193) 2020-07-13 08:04:35 -04:00
Quentin McGaw
4a7d341c57 Fixing extra subnets firewall rules
- Fix #194
- Fix #190
- Refers to #188
2020-07-13 02:17:49 +00:00
Quentin McGaw
95ad58687d Remove duplicate firewall rule for tun0 2020-07-13 02:15:32 +00:00
Quentin McGaw
0fc69e068e FIREWALL_DEBUG variable, refers to #190, #194 2020-07-13 02:14:56 +00:00
Quentin McGaw
7252ac722c Logging improvements (#195)
- Fix (and test) filtering of lines
- Filter out shadowsocks cannot resolve error
- Change tinyproxy color
- Deduct logging level according to message content
2020-07-12 21:19:44 -04:00
Quentin McGaw
4cd6b33044 Add missing subnets setup, fixes #190
- Also setup subnet routes when firewall is disabled
2020-07-12 21:21:41 +00:00
Quentin McGaw
0731b1cb82 Remove horrible firewall debug 1 printing 2020-07-12 19:22:48 +00:00
Quentin McGaw
07efea612b Minor changes
- Remove unneeded string conversions
- Remove resolve-retry infinite openvpn configuration (unneeded)
- Add cover on single tests and single test files for Vscode
2020-07-12 19:15:05 +00:00
Quentin McGaw
6afa4f69a0 Fix routing reading issues
- Detect VPN gateway properly
- Fix local subnet detection, refers to #188
- Split LocalSubnet from DefaultRoute (2 different routes actually)
2020-07-12 19:05:48 +00:00
Quentin McGaw
2acf627918 Fixes #191 2020-07-12 15:21:32 +00:00
Quentin McGaw
4eb7c4ac36 Support for username and password changes 2020-07-12 14:55:03 +00:00
Quentin McGaw
b4c838e6ab Changes to cyberghost openvpn configuration
- Comment out redirect-gateway def1
- Add explicit-exit-notify 2 to ensure disconnection server side
- Remove ping-exit instructions
- Remove resolv-retry infinite (unneeded)
2020-07-12 14:47:37 +00:00
Quentin McGaw
8b096af04e DNS_KEEP_NAMESERVER variable, refers to #188 2020-07-11 23:51:53 +00:00
Quentin McGaw
78b63174ce Update VPN server IP addresses
- PIA updated
- Surfshark updated
- Windscribe updated (US East and Slovenia removed)
- Capital letters fixed for regions of Windscribe
- Resolver program updated to match latest format for constants
2020-07-11 22:02:25 +00:00
Quentin McGaw
11fca08028 Port forwarded firewall fix 2020-07-11 21:30:26 +00:00
Quentin McGaw
515e72a0ed Update versions in readme 2020-07-11 21:10:41 +00:00
Quentin McGaw
2f9d1f09d3 Minor changes
- Remove https://ip4.ddnss.de/meineip.php
- Logs when falling back to plaintext DNS
2020-07-11 21:04:46 +00:00
Quentin McGaw
b1596bc7e4 Firewall refactoring
- Ability to enable and disable rules in various loops
- Simplified code overall
- Port forwarding moved into openvpn loop
- Route addition and removal improved
2020-07-11 21:03:55 +00:00
Quentin McGaw
ccf11990f1 Fix several async issues
- race conditions between ctx.Done and waitError channel
- Sleep for retry cancels on cancelation of context
- Stops the any loop at the start if the context was canceled
- Mentions when loops exit
- Wait for errors on triggered loop restarts
2020-07-11 20:59:30 +00:00
Quentin McGaw
1ac06ee4a8 Fatal waits for subprocesses to complete 2020-07-09 22:04:04 +00:00
Quentin McGaw
dc1c7eab81 Fix #187 (silly me #2) 2020-07-09 11:56:43 +00:00
Quentin McGaw
5bf471767d Remove unneeded waiter object 2020-07-08 23:43:03 +00:00
Quentin McGaw
3d25db1bed Waits properly for all subprocess to exit 2020-07-08 23:42:54 +00:00
Quentin McGaw
99e386abc8 Using a waitgroup to wait for all programs to exit 2020-07-08 23:36:02 +00:00
Quentin McGaw
8669748289 Shadowsocks loop 2020-07-08 23:29:40 +00:00
Quentin McGaw
a39d885e34 Minor fixes
- Not logging program name twice for wait errors
- Wait for tinyproxy to exit
2020-07-08 23:29:22 +00:00
Quentin McGaw
7d36993450 Tinyproxy run loop 2020-07-08 23:20:33 +00:00
Quentin McGaw
0d53461706 Quick fix: uid and gid for openvpn 2020-07-08 22:51:27 +00:00
Quentin McGaw
758f316816 Small constants changes
- ifconfig.me/ip added, see #186
- Remove trailing space for a Surfshark region
2020-07-08 22:47:48 +00:00
Quentin McGaw
ad73a027f3 Gets public IP every hour 2020-07-08 22:47:12 +00:00
Quentin McGaw
2c96f91043 Merge branch 'master' of github.com:qdm12/private-internet-access-docker 2020-07-08 22:33:40 +00:00
Quentin McGaw
53b7fafc49 Public IP loop, fixes #186
- Uses common http client with 15 seconds timeout
- Repeats on fail after 5 seconds sleep time
2020-07-08 22:33:28 +00:00
Quentin McGaw
7450ffce2b uid and gid variables (no change at runtime) 2020-07-08 22:13:59 +00:00
Quentin McGaw
765f06e5a8 Write auth file in openvpn loop 2020-07-08 22:11:23 +00:00
Rick van Hattem
e304b4a829 Updated readme to match the Dockerfile (#185) 2020-07-08 09:19:56 -04:00
Quentin McGaw
3ae4523280 Merge branch 'master' of github.com:qdm12/private-internet-access-docker 2020-07-08 13:14:50 +00:00
Quentin McGaw
7a136db085 Simplified loop mechanism for openvpn and dns
- Refers to #91
- http control server starts without waiting for unbound and/or openvpn
- Trying to get rid of waiter and use channels directly
- Simpler main.go
- More robust logic overall
2020-07-08 13:14:39 +00:00
Rick van Hattem
e809e178b9 Added Surfshark documentation for authentication (#182) 2020-07-07 21:14:05 -04:00
Rick van Hattem
dd529a48fa Stripped extraneous whitespace (#180) 2020-07-07 17:33:35 -04:00
Rick van Hattem
2c6eae4e90 Set Surfshark ping-restart to valid value (#183)
No idea why this was here, but thanks for fixing it 🥇
2020-07-07 17:30:06 -04:00
Quentin McGaw
18e99d07d0 Move provider settings in openvpn settings 2020-07-05 20:05:38 +00:00
Quentin McGaw
a4b0e0ff86 Fix provider settings logging 2020-07-05 20:05:15 +00:00
Quentin McGaw
7e36fbbd00 Refers to #179 (Cyberghost)
- Fix <crt> -> <cert>
- Fix certificates (ca.crt and client.crt)
2020-07-05 16:20:40 +00:00
Quentin McGaw
d228216d1c Fix #179 2020-07-04 17:48:22 +00:00
Quentin McGaw
c9368e352c DNS_PLAINTEXT_ADDRESS, fixes #176 2020-06-26 14:40:46 +00:00
Quentin McGaw
d947d9fe30 Rename dev extension ms-vscode.go to golang.go 2020-06-26 14:37:11 +00:00
Quentin McGaw
613ded51ab Upgrade to Alpine 3.12 2020-06-26 14:36:31 +00:00
Quentin McGaw
3b43b7c2f6 Add script security 2 to run vpn provider scripts
Fix Bug: ... #176
2020-06-21 20:21:13 -04:00
Quentin McGaw
cdbb7bf771 Fix #175 2020-06-18 18:05:51 +00:00
Quentin McGaw
5a6cf0fe3a Remove firewall nat chain clearing, refers to #171 2020-06-16 12:20:33 +00:00
Quentin McGaw
082a5bdf51 Fix http control server not working when DOT=off 2020-06-16 00:11:22 +00:00
Quentin McGaw
7369808b84 Refactor (#174)
- Goal was to simplify main.go complexity
- Use common structures and interfaces for all vpn providers
- Moved files around
- Removed some alias models
2020-06-13 14:08:29 -04:00
Quentin McGaw
4f502abcf8 Cyberghost support (#168)
* Host finder CLI for cyberghost
* Resolver program updated with Cyberghost data
* Gluetun cli clientkey subcommand
2020-06-13 10:43:47 -04:00
Quentin McGaw
bdcadf09ec Fix: Shadowsocks nameserver when DOT=off 2020-06-13 13:57:26 +00:00
Quentin McGaw
8cae369186 Add FIREWALL variable, refers to #171 2020-06-12 17:11:21 +00:00
Quentin McGaw
a3d75f3d8b Replace p with r for params reader (lint issue) 2020-06-12 17:07:32 +00:00
Quentin McGaw
1a06d01ae2 Fix #172 kernel module for Synology 2020-06-10 01:34:20 +00:00
Quentin McGaw
634cef2bb2 Only resolve github.com for healthcheck, fix #170 2020-06-10 01:25:10 +00:00
Quentin McGaw
6107f5c4ab Fix #173 2020-06-10 01:16:58 +00:00
Quentin McGaw
6ae9dc5c2c Update list of donators in readme 👍 2020-06-08 08:31:18 -04:00
Quentin McGaw
ea3a173e3b Remove persist-tun, fix #171
- Now openvpn tries other vpn ip addresses available on restart
- In case of  a bad ip address, it will try other random ones
2020-06-08 11:08:07 +00:00
Quentin McGaw
69217f61a1 Update PIA servers IP addresses, refers to #171 2020-06-08 11:06:11 +00:00
Quentin McGaw
e33a6a8503 Fix #170 2020-06-05 19:32:12 -04:00
Quentin McGaw
0fb065eb61 Fix bad comparison in healthcheck 2020-06-05 12:46:44 +00:00
Quentin McGaw
f6a2aac475 Fix #170 2020-06-04 22:13:49 +00:00
Quentin McGaw
900fa261d8 Better healthcheck (#169), fixes #133
* Changed healthcheck to get and compare IP address
* Change default healthcheck frequency and retries
2020-06-03 21:52:44 -04:00
Quentin McGaw
cfb4dd84bc Replace pia with gluetun wherever possible
- in Readme documentation
- Changed splash title string
- Changed Dockerfile labels
- Changed commands and docker-compose service & container name
2020-06-03 02:11:35 +00:00
Quentin McGaw
4f72f60a3e .dockerignore updated 2020-06-02 23:12:04 +00:00
Quentin McGaw
f262ee6454 Resolver cli changes
- Max of 10 simultaneous goroutines to avoid being throttled by DNS
- All template formatting moved to formatLine function
- resolveRepeat is synchronous to avoid being throttled by DNS
2020-06-02 23:10:04 +00:00
Quentin McGaw
20a3327815 Minor changes
- PORT is for Mullvad but also Windscribe (docker-compose, README.md)
- Windscribe configurator does not need lookupIP anymore
2020-06-02 23:07:29 +00:00
Quentin McGaw
3ab1298b1f Main function improved
- More explicit cli operation
- Using ctx and os.Args injected for eventual later testing
- Returning exit code
- Cli code moved to cli package
2020-06-02 23:03:18 +00:00
Quentin McGaw
a7739b6f5d Add multi hop regions and ips for Surfshark 2020-05-31 19:50:28 +00:00
Quentin McGaw
263368af89 Remove cipher and auth restrictive checks 2020-05-29 12:01:45 +00:00
Quentin McGaw
96e57d2c32 Surfshark (#167) 2020-05-29 07:24:27 -04:00
Quentin McGaw
85a93bdd34 Remove timestamps from program logs
- Using suppress-timestamps for openvpn
- Using custom regexp for tinyproxy, shadowsocks and unbound
- Time is now only shown once per line
- Log level of subprogram is preserverd
2020-05-29 11:17:14 +00:00
Quentin McGaw
cc80d224c2 Review current openvpn configuration
- tls-client unneeded if client is specified
- Moved settings around in config file
2020-05-29 10:29:07 +00:00
Quentin McGaw
c85cca7fdc Workflow adjustments:
- Paths ignore for all docker build
- Remove security workflow (CVEs should be fixed by Alpine)
2020-05-29 10:20:45 +00:00
Quentin McGaw
3f6d3d7c2a Openvpn files parser tool binary 2020-05-29 10:13:42 +00:00
Quentin McGaw
09a0ba1228 DNS Resolver tool binary 2020-05-29 10:13:29 +00:00
Quentin McGaw
6b81ed6bde Unneeded Docker init, Go entrypoint does it 2020-05-29 10:12:38 +00:00
Quentin McGaw
64e447b262 Minor code and comments changes 2020-05-29 00:09:49 +00:00
Quentin McGaw
d0926111e0 Env variables cleanup in Docker config files 2020-05-29 00:03:10 +00:00
Quentin McGaw
aac4298f69 Moved main.go to cmd/gluetun/main.go 2020-05-28 23:59:35 +00:00
Quentin McGaw
f4018d3411 Fix PIA region case sensitivity, refers to #163 2020-05-28 01:07:32 +00:00
Quentin McGaw
0710199409 Updated IP addresses for Windscribe and PIA
- Updated test functions to resolve subdomains
- IP addresses are in increasing order
- One line per region/subdomain
2020-05-27 00:52:52 +00:00
Quentin McGaw
43c15b3e68 Removed double message in port forwarding logging 2020-05-18 13:39:01 +00:00
Quentin McGaw
ab223a5e06 User specified iptables rules (#161) 2020-05-18 09:37:34 -04:00
Quentin McGaw
fd5e7af3ff Improve environment variables table 2020-05-17 18:34:57 -04:00
Quentin McGaw
886d4ad1a9 Update readme for new wiki 2020-05-17 17:54:37 -04:00
Quentin McGaw
40a72b6189 Update golangci-lint to 1.27.0 2020-05-17 17:49:40 -04:00
Quentin McGaw
5eb1859f41 Fix #156 falls back to dns on ipv4 only 2020-05-09 00:54:49 +00:00
Quentin McGaw
b45fa026dd Improved openvpn run loop 2020-05-09 00:43:09 +00:00
Quentin McGaw
da739a0c3d Fix waitForAll context for graceful exits 2020-05-07 12:58:37 +00:00
Quentin McGaw
0dc400b540 Fix Unbound run loop logic
- Plain DNS is used only for the first resolving of github.com to obtain block lists and crypto files required by Unbound
- DNS over TLS is used at all time by the system and the Go program thereafter, even between periodic restarts
- Downtime during a periodic update is < 1 second
- On an Unbound start or unexpected exit error, the container falls back on the unencrypted version of the DNS in order to try restarting Unbound
2020-05-07 12:56:49 +00:00
Quentin McGaw
d12668d57f Fix logic to disable DNS periodic update 2020-05-05 22:02:23 +00:00
Quentin McGaw
c39affeb12 GolangCi-lint 1.
26.0
2020-05-05 18:01:12 +00:00
Quentin McGaw
d73765a5f5 DNS_UPDATE_PERIOD environment variable 2020-05-05 18:00:56 +00:00
Quentin McGaw
37282c014b Removed greetings workflow (not working on forks) 2020-05-04 23:05:03 +00:00
Quentin McGaw
adeccf8548 ip6tables package, refers to #153 2020-05-04 12:27:15 +00:00
Quentin McGaw
a97cbcc4e4 Refers to #153 2020-05-04 12:24:34 +00:00
Quentin McGaw
89187b6b86 Fix #142 2020-05-03 16:28:59 +00:00
Quentin McGaw
754bab9763 Unbound restart logic
- Update files and restart unbound every 24hours
- HTTP route to force update & restart of Unbound
- Fix #151
2020-05-02 17:08:15 +00:00
Quentin McGaw
0d7f6dab1a Remove unneeded functionNotSet in server 2020-05-02 17:04:01 +00:00
Quentin McGaw
507374ca4e Improve openvpn run loop logs 2020-05-02 17:03:11 +00:00
Quentin McGaw
318c3c9032 Control server announcement 2020-05-02 17:02:39 +00:00
Quentin McGaw
c068484fa0 Initial DNS IP is ipv4/6 depending on DOT_IPV6 2020-05-02 15:41:28 +00:00
Quentin McGaw
7cd35737ba Defaults DOT_IPV6 to off 2020-05-02 15:40:40 +00:00
Quentin McGaw
0247a1ff01 Refers to #142 2020-05-02 14:59:22 +00:00
Quentin McGaw
363fabc810 Reduced main.go code complexity 2020-05-02 14:48:18 +00:00
Quentin McGaw
6049b10209 Update firewall documentation 2020-05-02 13:13:19 +00:00
Quentin McGaw
bc05ff34fd Launch DNS over TLS after tunneling
- No data is downloaded before tunneling
- Fixes #127
2020-05-02 13:11:41 +00:00
Quentin McGaw
8e77842f1e FatalOnError cancels parent context 2020-05-02 13:05:09 +00:00
Quentin McGaw
41168f88cd Improved connected signaling mechanism 2020-05-01 03:15:49 +00:00
Quentin McGaw
88ad10d429 PIA and Windscribe hardcoded IP addresses
- Allows to not need to resolve subdomains at start before tunneling
- Allows for Unbound to be configured and started after tunneling
- Refers to #127
2020-05-01 03:14:16 +00:00
Quentin McGaw
f4cd1896c9 Go HTTP control server with restart openvpn route
- Fix #147
- Dockerfile updated
- Documentation updated
- Using contexts to restart openvpn
- Code foundation for more http routes
2020-04-30 23:41:57 +00:00
Quentin McGaw
944e6a107b Logs wait function errors as soon as they happen 2020-04-30 23:39:28 +00:00
Quentin McGaw
b6135d2476 Support consoles without /dev/stdout 2020-04-30 23:34:35 +00:00
Quentin McGaw
c9b6e79792 Clear ip status file on termination 2020-04-30 12:55:07 +00:00
Quentin McGaw
94255aaa38 Better onConnected logic
- First port forward after 5 seconds
- Public IP obtained ASAP
- Logging in main only
- Allow port forward firewall with 1 second timeout local context
2020-04-30 12:54:48 +00:00
Quentin McGaw
ac706bd156 Wait for openvpn to exit on program termination 2020-04-30 11:01:22 +00:00
Quentin McGaw
d864a9f580 Refixes #148 2020-04-30 10:48:26 +00:00
Quentin McGaw
a32318d246 Improve issue templates 2020-04-30 10:38:31 +00:00
Quentin McGaw
45a7a5b9e2 Fix build 2020-04-30 00:46:29 +00:00
Quentin McGaw
9af2a7a640 Retry port forwarding after 5 seconds, fix #148 2020-04-30 00:02:27 +00:00
Quentin McGaw
eb62ad06db Better context handling (prep for restart logic) 2020-04-29 23:59:23 +00:00
Quentin McGaw
a033637e85 Better exit handling 2020-04-29 01:27:42 +00:00
Quentin McGaw
b0ea739c20 Restarts openvpn on failure without Docker restart (#144) 2020-04-28 21:22:18 -04:00
Quentin McGaw
352af84977 Workflows adjustments (#124)
* reviewdog/action-misspell@master
* Improve issue templates
2020-04-28 08:48:06 -04:00
Quentin McGaw
eb149ee040 Fix bad links in FAQ 2020-04-28 08:43:21 -04:00
Quentin McGaw
9b3166a2e2 Add @Frepke to sponsors in readme 2020-04-28 08:43:13 -04:00
Quentin McGaw
e94f4283e1 Port forwards 1 second after openvpn connects 2020-04-27 12:10:36 +00:00
Quentin McGaw
ef0959a15e Update Golangci-lint to v1.25.0 2020-04-26 13:28:26 +00:00
Quentin McGaw
36424c08ac Better checks for user provided private addresses 2020-04-26 13:28:14 +00:00
Quentin McGaw
97ea5f63b8 Removes port forward status file at exit 2020-04-19 20:45:34 +00:00
Quentin McGaw
88c9d3d687 Waits 300ms before first DNS resolution try 2020-04-19 20:44:33 +00:00
Quentin McGaw
f1569dac05 Each stream uses a different color, fixes #136 2020-04-19 20:40:31 +00:00
Quentin McGaw
4cb32ef9dc Reliably wait for all processes to exit 2020-04-19 20:10:48 +00:00
Quentin McGaw
e805d42197 Updated dependencies 2020-04-19 18:13:48 +00:00
Quentin McGaw
cbd11bfdf2 Thanks @Ralph521 ! 2020-04-15 12:33:50 +00:00
Quentin McGaw
422bd8d428 Log stderr stream from shadowsocks 2020-04-14 12:22:14 +00:00
Quentin McGaw
58459f0336 PIA_ENCRYPTION in readme, thanks @Frepke 2020-04-14 07:43:14 -04:00
Quentin McGaw
6f6e227b94 Add section for sponsors, donations in readme 2020-04-13 00:32:57 +00:00
Quentin McGaw
e015cd4a27 Windscribe affiliate link, refers to #109 2020-04-13 00:21:41 +00:00
Quentin McGaw
768147095f Golangcilint in build pipeline and fix lint errors
- Fix bad permissions bits for files
- VPNSP is 'private internet access' instead of 'pia' (retro compatible)
- Check errors of deferred unsetEnv functions in params package
-  Other lint errors fixing and code simplifications
2020-04-12 20:05:28 +00:00
Quentin McGaw
8f6b6306d6 Formatting of files (goimport) 2020-04-12 20:01:33 +00:00
Quentin McGaw
fb4c9b8a58 Vscode workspace settings 2020-04-12 19:53:50 +00:00
Quentin McGaw
3d7cfb125a Using WithPrefix for loggers 2020-04-12 19:07:19 +00:00
Quentin McGaw
d42de99879 Updated golibs and using gomock+mockgen for tests 2020-04-12 18:09:46 +00:00
Quentin McGaw
68203c221d Refactored documentation for Docker hub workflow
- Readme size lowered to 18KB
- Documents created in doc/ directory
- faq.md, firewall.md, development.md
- Title svg as absolute path for Docker hub
- Re-enabled Docker hub description workflow
2020-04-12 13:42:41 +00:00
Quentin McGaw
3ac3e5022c IP_STATUS_FILE and routing improvements (#130)
- Obtains VPN public IP address from routing table
- Logs and writes VPN Public IP address to `/ip` as soon as VPN is up
- Obtain port forward, logs it and writes it as soon as VPN is up
- Routing fully refactored and tested
- Routing reads from `/proc/net/route`
- Routing mutates the routes using `ip route ...`
2020-04-12 08:55:13 -04:00
Quentin McGaw
da8391e9ae Using %s instead of %w for format print 2020-04-12 02:42:32 +00:00
Quentin McGaw
ebdf241888 Show DNS lookup error, refers to #127 2020-04-09 13:17:55 +00:00
Quentin McGaw
60cec716b2 Clears port forward status file at exit, fix #125 2020-04-09 12:11:36 +00:00
Quentin McGaw
e7a475a303 Stops on port forwarding error, fixes #120 2020-03-31 12:03:26 +00:00
Quentin McGaw
67588e0072 Merge branch 'master' of github.com:qdm12/private-internet-access-docker 2020-03-30 12:01:45 +00:00
Quentin McGaw
bfa3d749ac Fix test 2020-03-30 12:01:35 +00:00
Quentin McGaw
7e79d9696f TZ setting shown at start (#119) 2020-03-30 07:58:40 -04:00
Quentin McGaw
f251c6aa4d Using UID and GID given for Tinyproxy, fixes #118 2020-03-30 11:56:38 +00:00
Quentin McGaw
d2117cd043 Improved environment variables table 2020-03-30 00:48:54 +00:00
Quentin McGaw
0235df74a0 SHADOWSOCKS_METHOD environment variable (#117) 2020-03-29 20:06:27 -04:00
Quentin McGaw
e5adccd9c5 Custom UID and GID for subprocesses and files written (#116) Fix #116
- Environment variables `UID` and `GID`, both defaulting to `1000`
- All subprocesses (openvpn, tinyproxy, etc.) run using the UID and GID given
- All files are written with an ownership for the UID and GID given
- Port forwarded file has also ownership for UID, GID and read permission only
2020-03-29 19:52:49 -04:00
Quentin McGaw
76cea56864 Windscribe support (#114) 2020-03-29 16:42:06 -04:00
Quentin McGaw
643745d33e OPENVPN_AUTH variable, refers to #94 2020-03-29 16:22:21 -04:00
Quentin McGaw
3d6a580102 Workflow minor fixes
- Renamed bad name in PR docker build
- Removed escaped \n in greetings
- Fixed up misspell action
2020-03-29 11:30:37 -04:00
Quentin McGaw
d4a1828c1d Issue templates updated 2020-03-29 11:29:59 -04:00
Quentin McGaw
bdf96d864e Check custom cipher value for each vpn provider 2020-03-27 01:10:54 +00:00
Quentin McGaw
15a549be11 OPENVPN_CIPHER variable (#100), refers to #94 and #59 2020-03-26 20:29:32 -04:00
Quentin McGaw
d534f92432 Workflows changes
- Simple Docker build for PRs
- Only run buildx for latest tag on pushes to master branch
2020-03-26 20:17:10 -04:00
Quentin McGaw
d0c61662b5 Revise workflows (#99) 2020-03-26 08:35:48 -04:00
Quentin McGaw
98b076e2cb Rename ENCRYPTION to PIA_ENCRYPTION (#98) 2020-03-26 08:11:50 -04:00
github-actions[bot]
0b997fe6c8 Typos fixes (#95)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-03-25 18:28:28 -04:00
Quentin McGaw
b0c0bd6364 Updated readme build status badge 2020-03-25 18:23:09 -04:00
Quentin McGaw
c61a418430 Docker build with workflows instead of Travis CI 2020-03-25 18:22:02 -04:00
Quentin McGaw
e6bbaa2ba6 Security analysis workflow 2020-03-25 18:21:36 -04:00
Quentin McGaw
17ccf98c75 Docker hub description sync workflow 2020-03-25 18:21:26 -04:00
Quentin McGaw
4db67c70b8 Misspell workflow 2020-03-25 18:21:14 -04:00
Quentin McGaw
3250a20ffc Issue templates 2020-03-25 18:21:01 -04:00
Quentin McGaw
6c12fdff2b Labels and greetings Github workflows 2020-03-25 18:20:52 -04:00
Quentin McGaw
f033204844 Contribution doc updated
- Codeowners file
- Contributing doc file
- Readme dev and contributing updated
2020-03-25 18:19:57 -04:00
Quentin McGaw
e334cf6c5f Minor changes 2020-03-23 20:37:56 +00:00
Quentin McGaw
9435db8e1e Fix #90 add env variable OPENVPN_TARGET_IP 2020-03-18 23:49:40 +00:00
Quentin McGaw
d2b361b998 Fix #81, new env variable OPENVPN_ROOT 2020-03-18 23:05:47 +00:00
Quentin McGaw (desktop)
9d786bf338 Update to Go 1.14 2020-03-18 01:04:44 +00:00
Quentin McGaw (desktop)
3339455a97 Simpler readme svg title 2020-03-18 01:04:33 +00:00
Quentin McGaw (desktop)
0eb2e5a120 Removed unecessary tun-ipv6 from pia ovpn config 2020-03-05 01:03:33 +00:00
Quentin McGaw (desktop)
d0f678c315 Add DNS over TLS ipv6 upstream servers, see #88 2020-03-05 00:54:33 +00:00
Quentin McGaw (desktop)
0c48d2d5a0 DOT_IPV6 environment variable added, refers to #88 2020-03-05 00:51:04 +00:00
Quentin McGaw (desktop)
47a197be48 Add ipv6 documentation, refers to #86 2020-03-05 00:01:04 +00:00
Quentin McGaw (desktop)
28edae383b Changed openvpn Mullvad settings, refers to #86 2020-03-04 23:52:41 +00:00
Quentin McGaw (desktop)
939b58c457 Ortograph! Renamed annoucement to announcement 2020-03-04 23:47:21 +00:00
Quentin McGaw
fa0272d5ad Support Mullvad over openvpn (#85)
Additional changes:
- Allow empty value for PIA region
- Most settings are lowercased
- `OPENVPN_VERBOSITY` environment variable
- openvpn also tunnels IPv6, and unbound supports ipv6
- auth kept only on disk, not in memory
- readme reworked
- CI script fixed and improved
- Added v2 Docker tag
- Shadowsocks log defaults to `off`
2020-02-29 21:05:20 -05:00
Quentin McGaw (desktop)
839c6f05dd Upgraded golibs 2020-03-01 02:03:57 +00:00
Quentin McGaw (desktop)
9ada201b82 Fixed and improved CI script 2020-02-25 11:47:08 +00:00
Quentin McGaw (desktop)
dd0170afb1 Annoucement expiration time parsing 2020-02-25 11:46:52 +00:00
Quentin McGaw (desktop)
9239e840c4 Fixed CI script for pull requests 2020-02-23 19:11:03 -05:00
Quentin McGaw (desktop)
96713b26cb README: contributors section 2020-02-22 17:56:04 +00:00
Quentin McGaw (desktop)
3ad60349db Applied JeordyR's changes 2020-02-22 17:55:49 +00:00
Quentin McGaw (desktop)
5ee4e2fde0 Shadowsocks log defaults to off 2020-02-22 17:43:17 +00:00
Quentin McGaw (desktop)
ce4fd8bc68 TODOs are in a collapsible (most users don't care) 2020-02-22 17:35:50 +00:00
Quentin McGaw (desktop)
90fc12a941 Added v2 Docker tag 2020-02-22 17:34:41 +00:00
Quentin McGaw (desktop)
16995e1d93 Changed CI script 2020-02-22 17:32:05 +00:00
Quentin McGaw (desktop)
9669938703 Port forwarding section reworked 2020-02-22 17:15:42 +00:00
Quentin McGaw (desktop)
ac60cf8ab8 Minor changes 2020-02-22 17:07:06 +00:00
Quentin McGaw (desktop)
f5a32e690f README: Updated and refactored features section 2020-02-22 17:06:35 +00:00
Quentin McGaw (desktop)
4e622a92a5 README: Rework requirements 2020-02-22 17:05:52 +00:00
Quentin McGaw (desktop)
d1412f43fd Changed announcement 2020-02-22 17:04:50 +00:00
Quentin McGaw (desktop)
1b3a135920 Reworked readme's FAQ 2020-02-22 16:35:26 +00:00
Quentin McGaw (desktop)
53db4813fa Allow PIA server to choose compression 2020-02-22 16:34:28 +00:00
Quentin McGaw (desktop)
2f09ed9069 tls-client openvpn client instruction added 2020-02-22 16:34:05 +00:00
Quentin McGaw (desktop)
9202d6c15f Do not keep auth in memory, only on disk 2020-02-22 16:33:37 +00:00
Quentin McGaw (desktop)
023f1c7e8e Tunnels IPv6 2020-02-22 16:32:59 +00:00
Quentin McGaw (desktop)
1aebe1a4c1 Simplified GetUser and GetPassword using libparams 2020-02-22 15:53:50 +00:00
Quentin McGaw (desktop)
f45f40eee1 Added OPENVPN_VERBOSITY environment variable 2020-02-22 15:48:09 +00:00
Quentin McGaw (desktop)
ab5d60754f Read some values with case sensitivity 2020-02-22 15:43:33 +00:00
Quentin McGaw (desktop)
83e8bb780a Fix reading region without case sensitivity 2020-02-22 13:52:33 +00:00
Quentin McGaw (desktop)
888d8bbf87 Lowercased all Mullvad server constants 2020-02-16 22:39:05 +00:00
Quentin McGaw (desktop)
fbf04677f1 Minor fixes 2020-02-16 22:27:49 +00:00
Quentin McGaw (desktop)
2051aa1b04 Wire up everything for Mullvad and PIA in main.go 2020-02-16 22:16:11 +00:00
Quentin McGaw (desktop)
fc88ee135d Added Mullvad settings setup 2020-02-16 22:15:52 +00:00
Quentin McGaw (desktop)
a6f9a1a3d1 Fix GetVPNSP 2020-02-16 22:15:06 +00:00
Quentin McGaw (desktop)
f181ff0005 Added Mullvad environment variables and getters 2020-02-16 20:30:29 +00:00
Quentin McGaw (desktop)
71dcf23013 Allow empty value for PIA region 2020-02-16 20:29:37 +00:00
Quentin McGaw (desktop)
95ee3b4276 Moved GetUser and GetPassword to openvpn params getters 2020-02-16 19:55:01 +00:00
Quentin McGaw (desktop)
c42d13f14f Added Mullvad configuration builder 2020-02-16 19:51:08 +00:00
Quentin McGaw (desktop)
ce11745f6f Using struct for VPN connection settings 2020-02-16 19:50:21 +00:00
Quentin McGaw (desktop)
f6b91bd74f Added Mullvad constants and lists 2020-02-16 17:34:04 +00:00
Quentin McGaw (desktop)
5c69ddc05f Added Mullvad server model 2020-02-16 17:33:52 +00:00
276 changed files with 29586 additions and 4385 deletions

View File

@@ -0,0 +1,5 @@
.dockerignore
devcontainer.json
docker-compose.yml
Dockerfile
README.md

1
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1 @@
FROM qmcgaw/godevcontainer

69
.devcontainer/README.md Normal file
View File

@@ -0,0 +1,69 @@
# Development container
Development container that can be used with VSCode.
It works on Linux, Windows and OSX.
## Requirements
- [VS code](https://code.visualstudio.com/download) installed
- [VS code remote containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed
- [Docker](https://www.docker.com/products/docker-desktop) installed and running
- If you don't use Linux or WSL 2, share your home directory `~/` and the directory of your project with Docker Desktop
- [Docker Compose](https://docs.docker.com/compose/install/) installed
- Ensure your host has the following and that they are accessible by Docker:
- `~/.ssh` directory
- `~/.gitconfig` file (can be empty)
## Setup
1. Open the command palette in Visual Studio Code (CTRL+SHIFT+P).
1. Select `Remote-Containers: Open Folder in Container...` and choose the project directory.
1. For Docker running on Windows HyperV, if you want to use SSH keys, bind mount them at `/tmp/.ssh` by changing the `volumes` section in the [docker-compose.yml](docker-compose.yml).
## Customization
### Customize the image
You can make changes to the [Dockerfile](Dockerfile) and then rebuild the image. For example, your Dockerfile could be:
```Dockerfile
FROM qmcgaw/godevcontainer
USER root
RUN apk add curl
USER vscode
```
Note that you may need to use `USER root` to build as root, and then change back to `USER vscode`.
To rebuild the image, either:
- With VSCode through the command palette, select `Remote-Containers: Rebuild and reopen in container`
- With a terminal, go to this directory and `docker-compose build`
### Customize VS code settings
You can customize **settings** and **extensions** in the [devcontainer.json](devcontainer.json) definition file.
### Entrypoint script
You can bind mount a shell script to `/home/vscode/.welcome.sh` to replace the [current welcome script](shell/.welcome.sh).
### Publish a port
To access a port from your host to your development container, publish a port in [docker-compose.yml](docker-compose.yml).
### Run other services
1. Modify [docker-compose.yml](docker-compose.yml) to launch other services at the same time as this development container, such as a test database:
```yml
database:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: password
```
1. In [devcontainer.json](devcontainer.json), change the line `"runServices": ["vscode"],` to `"runServices": ["vscode", "database"],`.
1. In the VS code command palette, rebuild the container.

View File

@@ -1,62 +1,81 @@
{
"name": "pia-dev",
"dockerComposeFile": ["docker-compose.yml"],
"name": "gluetun-dev",
"dockerComposeFile": [
"docker-compose.yml"
],
"service": "vscode",
"runServices": ["vscode"],
"runServices": [
"vscode"
],
"shutdownAction": "stopCompose",
// "postCreateCommand": "go mod download",
"postCreateCommand": "source ~/.windows.sh && go mod download && go mod tidy",
"workspaceFolder": "/workspace",
"extensions": [
"ms-vscode.go",
"IBM.output-colorizer",
"eamodio.gitlens",
"mhutchie.git-graph",
"golang.go",
"eamodio.gitlens", // IDE Git information
"davidanson.vscode-markdownlint",
"shardulm94.trailing-spaces",
"alefragnani.Bookmarks",
"Gruntfuggly.todo-tree",
"mohsen1.prettify-json",
"quicktype.quicktype",
"spikespaz.vscode-smoothtype",
"stkb.rewrap",
"vscode-icons-team.vscode-icons"
"ms-azuretools.vscode-docker", // Docker integration and linting
"shardulm94.trailing-spaces", // Show trailing spaces
"Gruntfuggly.todo-tree", // Highlights TODO comments
"bierner.emojisense", // Emoji sense for markdown
"stkb.rewrap", // rewrap comments after n characters on one line
"vscode-icons-team.vscode-icons", // Better file extension icons
"github.vscode-pull-request-github", // Github interaction
"redhat.vscode-yaml", // Kubernetes, Drone syntax highlighting
"bajdzis.vscode-database", // Supports connections to mysql or postgres, over SSL, socked
"IBM.output-colorizer", // Colorize your output/test logs
"mohsen1.prettify-json", // Prettify JSON data
],
"settings": {
// General settings
"files.eol": "\n",
// Docker
"remote.extensionKind": {
"ms-azuretools.vscode-docker": "workspace"
},
// Golang general settings
"editor.codeActionsOnSaveTimeout": 3000,
"go.useLanguageServer": true,
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
// Optional: Disable snippets, as they conflict with completion ranking.
"editor.snippetSuggestions": "none"
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"gopls": {
"usePlaceholders": false,
"staticcheck": true
},
"go.autocompleteUnimportedPackages": true,
"go.gotoSymbol.includeImports": true,
"go.gotoSymbol.includeGoroot": true,
"gopls": {
"completeUnimported": true,
"deepCompletion": true,
"usePlaceholders": false
},
// Golang on save
"go.buildOnSave": "package",
"go.lintOnSave": "package",
"go.vetOnSave": "package",
"go.lintTool": "golangci-lint",
"go.buildOnSave": "workspace",
"go.lintOnSave": "workspace",
"go.vetOnSave": "workspace",
"editor.formatOnSave": true,
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
// Golang testing
"go.toolsEnvVars": {
"GOFLAGS": "-tags=integration"
"GOFLAGS": "-tags=",
// "CGO_ENABLED": 1 // for the race detector
},
"gopls.env": {
"GOFLAGS": "-tags=integration"
"GOFLAGS": "-tags="
},
"go.testEnvVars": {},
"go.testFlags": ["-v"],
"go.testTimeout": "600s"
"go.testEnvVars": {
"": ""
},
"go.testFlags": [
"-v",
// "-race"
],
"go.testTimeout": "10s",
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.coverOnTestPackage": true
}
}

View File

@@ -2,14 +2,29 @@ version: "3.7"
services:
vscode:
image: qmcgaw/godevcontainer
build: .
image: godevcontainer
volumes:
- ../:/workspace
- ~/.ssh:/home/vscode/.ssh:ro
- ~/.ssh:/root/.ssh:ro
# Docker socket to access Docker server
- /var/run/docker.sock:/var/run/docker.sock
# Docker configuration
- ~/.docker:/root/.docker:z
# SSH directory for Linux, OSX and WSL
- ~/.ssh:/root/.ssh:z
# For Windows without WSL, a copy will be made
# from /tmp/.ssh to ~/.ssh to fix permissions
#- ~/.ssh:/tmp/.ssh:ro
# Shell history persistence
- ~/.zsh_history:/root/.zsh_history:z
# Git config
- ~/.gitconfig:/root/.gitconfig:z
environment:
- TZ=
cap_add:
# For debugging with dlv
- SYS_PTRACE
security_opt:
# For debugging with dlv
- seccomp:unconfined
entrypoint: zsh -c "while sleep 1000; do :; done"

View File

@@ -1,10 +1,9 @@
.devcontainer
.git
.vscode
readme
.gitignore
.travis.yml
ci.sh
.github
doc
docker-compose.yml
Dockerfile
LICENSE
README.md
Dockerfile
title.svg

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
@qdm12

18
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,18 @@
# Contributing
Contributions are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [open source license of this project](../LICENSE).
## Submitting a pull request
1. [Fork](https://github.com/qdm12/gluetun/fork) and clone the repository
1. Create a new branch `git checkout -b my-branch-name`
1. Modify the code
1. Ensure the docker build succeeds `docker build .` (you might need `export DOCKER_BUILDKIT=1`)
1. Commit your modifications
1. Push to your fork and [submit a pull request](https://github.com/qdm12/gluetun/compare)
## Resources
- [Gluetun guide on development](https://github.com/qdm12/gluetun/wiki/Development)
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

37
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View File

@@ -0,0 +1,37 @@
---
name: Bug
about: Report a bug
title: 'Bug: FILL THIS TEXT!'
labels: ":bug: bug"
assignees: qdm12
---
**Is this urgent?**: No
**Host OS** (approximate answer is fine too): Ubuntu 18
**CPU arch** or **device name**: amd64
**What VPN provider are you using**:
**What are you using to run your container?**: Docker Compose
**What is the version of the program** (See the line at the top of your logs)
```
Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)
```
**What's the problem** 🤔
That feature doesn't work
**Share your logs... (careful to remove in example tokens)**
```log
PASTE YOUR LOGS
IN THERE
```

View File

@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a feature to add to this project
title: 'Feature request: FILL THIS TEXT!'
labels: ":bulb: feature request"
assignees: qdm12
---
**What's the feature?** 🧐
- Support this new feature because that and that
**Optional extra information** 🚀
- I tried `docker run something` and it doesn't work
- That [url](https://github.com/qdm12/gluetun) is interesting

53
.github/ISSUE_TEMPLATE/help.md vendored Normal file
View File

@@ -0,0 +1,53 @@
---
name: Help
about: Ask for help
title: 'Help: FILL THIS TEXT!'
labels: ":pray: help wanted"
assignees:
---
**Is this urgent?**: No
**Host OS** (approximate answer is fine too): Ubuntu 18
**CPU arch** or **device name**: amd64
**What VPN provider are you using**:
**What is the version of the program** (See the line at the top of your logs)
```
Running version latest built on 2020-03-13T01:30:06Z (commit d0f678c)
```
**What's the problem** 🤔
That feature doesn't work
**Share your logs... (careful to remove in example tokens)**
```log
PASTE YOUR LOGS
IN THERE
```
**What are you using to run your container?**: Docker Compose
Please also share your configuration file:
```yml
your .yml
content
in here
```
or
```sh
# your docker
# run command
# in here
```

17
.github/ISSUE_TEMPLATE/provider.md vendored Normal file
View File

@@ -0,0 +1,17 @@
---
name: Support a VPN provider
about: Suggest a VPN provider to be supported
title: 'VPN provider support: NAME OF THE PROVIDER'
labels: ":bulb: New provider"
---
One of the following is required:
- Publicly accessible URL to a zip file containing the Openvpn configuration files
- Publicly accessible URL to a structured (JSON etc.) list of servers **and attach** an example Openvpn configuration file for both TCP and UDP
- Publicly accessible URL to the list of servers **and attach** an example Openvpn configuration file for both TCP and UDP
If the list of servers requires to login **or** is hidden behind an interactive configurator,
you can only use a custom Openvpn configuration file.
[The Wiki](https://github.com/qdm12/gluetun/wiki/Openvpn-file) describes how to do so.

15
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: docker
directory: /
schedule:
interval: "daily"
- package-ecosystem: gomod
directory: /
schedule:
interval: "daily"

81
.github/labels.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
- name: "Bug :bug:"
color: "b60205"
description: ""
- name: "Feature request :bulb:"
color: "0e8a16"
description: ""
- name: "Help wanted :pray:"
color: "4caf50"
description: ""
- name: "Documentation :memo:"
color: "c5def5"
description: ""
- name: "Needs more info :thinking:"
color: "795548"
description: ""
# VPN providers
- name: ":cloud: Cyberghost"
color: "cfe8d4"
description: ""
- name: ":cloud: HideMyAss"
color: "cfe8d4"
description: ""
- name: ":cloud: FastestVPN"
color: "cfe8d4"
description: ""
- name: ":cloud: Mullvad"
color: "cfe8d4"
description: ""
- name: ":cloud: NordVPN"
color: "cfe8d4"
description: ""
- name: ":cloud: PIA"
color: "cfe8d4"
description: ""
- name: ":cloud: Privado"
color: "cfe8d4"
description: ""
- name: ":cloud: PrivateVPN"
color: "cfe8d4"
description: ""
- name: ":cloud: ProtonVPN"
color: "cfe8d4"
- name: ":cloud: PureVPN"
color: "cfe8d4"
description: ""
- name: ":cloud: Surfshark"
color: "cfe8d4"
description: ""
- name: ":cloud: Torguard"
color: "cfe8d4"
description: ""
- name: ":cloud: Vyprvpn"
color: "cfe8d4"
description: ""
- name: ":cloud: Windscribe"
color: "cfe8d4"
description: ""
# Problem category
- name: "Openvpn"
color: "ffc7ea"
description: ""
- name: "Unbound (DNS over TLS)"
color: "ffc7ea"
description: ""
- name: "Firewall"
color: "ffc7ea"
description: ""
- name: "HTTP proxy"
color: "ffc7ea"
description: ""
- name: "Shadowsocks"
color: "ffc7ea"
description: ""
- name: "Healthcheck server"
color: "ffc7ea"
description: ""
- name: "Control server"
color: "ffc7ea"
description: ""

100
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: CI
on:
push:
paths:
- .github/workflows/build.yml
- cmd/**
- internal/**
- pkg/**
- .dockerignore
- .golangci.yml
- Dockerfile
- go.mod
- go.sum
jobs:
verify:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v2
- name: Linting
run: docker build --target lint .
- name: Go mod tidy check
run: docker build --target tidy .
- name: Build test image
run: docker build --target test -t test-container .
- name: Run tests in test container
run: |
touch coverage.txt
docker run --rm \
-v "$(pwd)/coverage.txt:/tmp/gobuild/coverage.txt" \
test-container \
go test \
-race \
-coverpkg=./... \
-coverprofile=coverage.txt \
-covermode=atomic \
./...
# We run this here to use the caching of the previous steps
- if: github.event_name == 'push'
name: Build final image
run: docker build .
publish:
needs: [verify]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: qmcgaw
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set variables
id: vars
env:
EVENT_NAME: ${{ github.event_name }}
run: |
BRANCH=${GITHUB_REF#refs/heads/}
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=commit::$(git rev-parse --short HEAD)
echo ::set-output name=build_date::$(date -u +%Y-%m-%dT%H:%M:%SZ)
if [ "$TAG" != "$GITHUB_REF" ]; then
echo ::set-output name=version::$TAG
echo ::set-output name=platforms::linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/ppc64le
elif [ "$BRANCH" = "master" ]; then
echo ::set-output name=version::latest
echo ::set-output name=platforms::linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/ppc64le
else
echo ::set-output name=version::$BRANCH
echo ::set-output name=platforms::linux/amd64,linux/386,linux/arm64,linux/arm/v6,linux/arm/v7,linux/ppc64le
fi
- name: Build and push final image
uses: docker/build-push-action@v2
with:
platforms: ${{ steps.vars.outputs.platforms }}
build-args: |
BUILD_DATE=${{ steps.vars.outputs.build_date }}
COMMIT=${{ steps.vars.outputs.commit }}
VERSION=${{ steps.vars.outputs.version }}
tags: |
qmcgaw/gluetun:${{ steps.vars.outputs.version }}
qmcgaw/private-internet-access:${{ steps.vars.outputs.version }}
push: true
- if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
name: Microbadger hook
run: curl -X POST https://hooks.microbadger.com/images/qmcgaw/gluetun/l-keGI7p4IhX4QuIDMFYKhsZ1L0=
continue-on-error: true

View File

@@ -0,0 +1,21 @@
name: Docker Hub description
on:
push:
branches: [master]
paths:
- README.md
- .github/workflows/dockerhub-description.yml
jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
username: qmcgaw
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: qmcgaw/gluetun
short-description: Lightweight Swiss-knife VPN client to connect to several VPN providers
readme-filepath: README.md

15
.github/workflows/labels.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: labels
on:
push:
branches: [master]
paths:
- .github/labels.yml
- .github/workflows/labels.yml
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-github-labeler@v3
with:
yaml-file: .github/labels.yml

15
.github/workflows/misspell.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Misspells
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
misspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-misspell@v1
with:
locale: "US"
level: error

72
.golangci.yml Normal file
View File

@@ -0,0 +1,72 @@
linters-settings:
maligned:
suggest-new: true
misspell:
locale: US
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- maligned
- path: internal/server/
linters:
- dupl
- path: internal/configuration/
linters:
- dupl
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- deadcode
- dogsled
- dupl
- errcheck
- exhaustive
- exportloopref
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- goheader
- goimports
- golint
- gomnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- interfacer
- lll
- maligned
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- prealloc
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
run:
skip-dirs:
- .devcontainer
- .github
- doc

View File

@@ -1,20 +0,0 @@
dist: xenial
sudo: required
git:
quiet: true
depth: 1
env:
global:
- DOCKER_REPO=qmcgaw/private-internet-access
before_install:
- curl -fsSL https://get.docker.com | sh
- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json
- mkdir -p $HOME/.docker
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json
- sudo service docker start
install:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name xbuilder --use
script: bash ci.sh
after_success:
- curl -X POST https://hooks.microbadger.com/images/$DOCKER_REPO/tQFy7AxtSUNANPe6aoVChYdsI_I= || exit 0

View File

@@ -1,8 +0,0 @@
{
"recommendations": [
"shardulm94.trailing-spaces",
"ms-azuretools.vscode-docker",
"davidanson.vscode-markdownlint",
"IBM.output-colorizer"
]
}

View File

@@ -1,71 +1,150 @@
ARG ALPINE_VERSION=3.11
ARG GO_VERSION=1.13.7
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
RUN apk --update add git
WORKDIR /tmp/gobuild
ENV CGO_ENABLED=0
COPY go.mod go.sum ./
RUN go mod download 2>&1
COPY internal/ ./internal/
COPY cmd/main.go .
RUN go test ./...
RUN go build -ldflags="-s -w" -o entrypoint main.go
FROM alpine:${ALPINE_VERSION}
ARG VERSION
ARG BUILD_DATE
ARG VCS_REF
ENV VERSION=$VERSION \
BUILD_DATE=$BUILD_DATE \
VCS_REF=$VCS_REF
LABEL \
org.opencontainers.image.authors="quentin.mcgaw@gmail.com" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.url="https://github.com/qdm12/private-internet-access-docker" \
org.opencontainers.image.documentation="https://github.com/qdm12/private-internet-access-docker" \
org.opencontainers.image.source="https://github.com/qdm12/private-internet-access-docker" \
org.opencontainers.image.title="PIA client" \
org.opencontainers.image.description="VPN client to tunnel to private internet access servers using OpenVPN, IPtables, DNS over TLS and Alpine Linux"
ENV USER= \
PASSWORD= \
ENCRYPTION=strong \
PROTOCOL=udp \
REGION="CA Montreal" \
DOT=on \
DOT_PROVIDERS=cloudflare \
DOT_PRIVATE_ADDRESS=127.0.0.1/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,::1/128,fc00::/7,fe80::/10,::ffff:0:0/96 \
DOT_VERBOSITY=1 \
DOT_VERBOSITY_DETAILS=0 \
DOT_VALIDATION_LOGLEVEL=0 \
DOT_CACHING=on \
BLOCK_MALICIOUS=on \
BLOCK_SURVEILLANCE=off \
BLOCK_ADS=off \
UNBLOCK= \
EXTRA_SUBNETS= \
PORT_FORWARDING=off \
PORT_FORWARDING_STATUS_FILE="/forwarded_port" \
TINYPROXY=off \
TINYPROXY_LOG=Info \
TINYPROXY_PORT=8888 \
TINYPROXY_USER= \
TINYPROXY_PASSWORD= \
SHADOWSOCKS=off \
SHADOWSOCKS_LOG=on \
SHADOWSOCKS_PORT=8388 \
SHADOWSOCKS_PASSWORD= \
TZ=
ENTRYPOINT /entrypoint
EXPOSE 8888/tcp 8388/tcp 8388/udp
HEALTHCHECK --interval=3m --timeout=3s --start-period=20s --retries=1 CMD /entrypoint healthcheck
RUN apk add -q --progress --no-cache --update openvpn ca-certificates iptables unbound tinyproxy tzdata && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk add -q --progress --no-cache --update shadowsocks-libev && \
rm -rf /*.zip /var/cache/apk/* /etc/unbound/* /usr/sbin/unbound-anchor /usr/sbin/unbound-checkconf /usr/sbin/unbound-control /usr/sbin/unbound-control-setup /usr/sbin/unbound-host /etc/tinyproxy/tinyproxy.conf && \
adduser nonrootuser -D -H --uid 1000 && \
chown nonrootuser -R /etc/unbound /etc/tinyproxy && \
chmod 700 /etc/unbound /etc/tinyproxy
COPY --from=builder --chown=1000:1000 /tmp/gobuild/entrypoint /entrypoint
ARG ALPINE_VERSION=3.13
ARG GO_VERSION=1.16
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
RUN apk --update add git
ENV CGO_ENABLED=0
WORKDIR /tmp/gobuild
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
FROM --platform=$BUILDPLATFORM base AS test
# Note on the go race detector:
# - we set CGO_ENABLED=1 to have it enabled
# - we install g++ to support the race detector
ENV CGO_ENABLED=1
RUN apk --update --no-cache add g++
FROM --platform=$BUILDPLATFORM base AS lint
ARG GOLANGCI_LINT_VERSION=v1.39.0
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION}
COPY .golangci.yml ./
RUN golangci-lint run --timeout=10m
FROM --platform=$BUILDPLATFORM base AS tidy
RUN git init && \
git config user.email ci@localhost && \
git config user.name ci && \
git add -A && git commit -m ci && \
sed -i '/\/\/ indirect/d' go.mod && \
go mod tidy && \
git diff --exit-code -- go.mod
FROM --platform=$BUILDPLATFORM base AS build
COPY --from=qmcgaw/xcputranslate:v0.4.0 /xcputranslate /usr/local/bin/xcputranslate
ARG TARGETPLATFORM
ARG VERSION=unknown
ARG BUILD_DATE="an unknown date"
ARG COMMIT=unknown
RUN GOARCH="$(xcputranslate -field arch -targetplatform ${TARGETPLATFORM})" \
GOARM="$(xcputranslate -field arm -targetplatform ${TARGETPLATFORM})" \
go build -trimpath -ldflags="-s -w \
-X 'main.version=$VERSION' \
-X 'main.buildDate=$BUILD_DATE' \
-X 'main.commit=$COMMIT' \
" -o entrypoint cmd/gluetun/main.go
FROM alpine:${ALPINE_VERSION}
ARG VERSION=unknown
ARG BUILD_DATE="an unknown date"
ARG COMMIT=unknown
LABEL \
org.opencontainers.image.authors="quentin.mcgaw@gmail.com" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$COMMIT \
org.opencontainers.image.url="https://github.com/qdm12/gluetun" \
org.opencontainers.image.documentation="https://github.com/qdm12/gluetun" \
org.opencontainers.image.source="https://github.com/qdm12/gluetun" \
org.opencontainers.image.title="VPN swiss-knife like client for multiple VPN providers" \
org.opencontainers.image.description="VPN swiss-knife like client to tunnel to multiple VPN servers using OpenVPN, IPtables, DNS over TLS, Shadowsocks, an HTTP proxy and Alpine Linux"
ENV VPNSP=pia \
VERSION_INFORMATION=on \
PROTOCOL=udp \
OPENVPN_VERBOSITY=1 \
OPENVPN_ROOT=yes \
OPENVPN_TARGET_IP= \
OPENVPN_IPV6=off \
OPENVPN_CUSTOM_CONFIG= \
TZ= \
PUID= \
PGID= \
PUBLICIP_FILE="/tmp/gluetun/ip" \
# VPN provider settings
OPENVPN_USER= \
OPENVPN_PASSWORD= \
USER_SECRETFILE=/run/secrets/openvpn_user \
PASSWORD_SECRETFILE=/run/secrets/openvpn_password \
REGION= \
COUNTRY= \
CITY= \
PORT= \
SERVER_HOSTNAME= \
# Mullvad only:
ISP= \
OWNED=no \
# Private Internet Access only:
PIA_ENCRYPTION=strong \
PORT_FORWARDING=off \
PORT_FORWARDING_STATUS_FILE="/tmp/gluetun/forwarded_port" \
# Cyberghost only:
CYBERGHOST_GROUP="Premium UDP Europe" \
OPENVPN_CLIENTCRT_SECRETFILE=/run/secrets/openvpn_clientcrt \
OPENVPN_CLIENTKEY_SECRETFILE=/run/secrets/openvpn_clientkey \
# Nordvpn only:
SERVER_NUMBER= \
# Openvpn
OPENVPN_CIPHER= \
OPENVPN_AUTH= \
# DNS over TLS
DOT=on \
DOT_PROVIDERS=cloudflare \
DOT_PRIVATE_ADDRESS=127.0.0.1/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,::1/128,fc00::/7,fe80::/10,::ffff:0:0/96 \
DOT_VERBOSITY=1 \
DOT_VERBOSITY_DETAILS=0 \
DOT_VALIDATION_LOGLEVEL=0 \
DOT_CACHING=on \
DOT_IPV6=off \
BLOCK_MALICIOUS=on \
BLOCK_SURVEILLANCE=off \
BLOCK_ADS=off \
UNBLOCK= \
DNS_UPDATE_PERIOD=24h \
DNS_PLAINTEXT_ADDRESS=1.1.1.1 \
DNS_KEEP_NAMESERVER=off \
# Firewall
FIREWALL=on \
FIREWALL_VPN_INPUT_PORTS= \
FIREWALL_INPUT_PORTS= \
FIREWALL_OUTBOUND_SUBNETS= \
FIREWALL_DEBUG=off \
# HTTP proxy
HTTPPROXY= \
HTTPPROXY_LOG=off \
HTTPPROXY_PORT=8888 \
HTTPPROXY_USER= \
HTTPPROXY_PASSWORD= \
HTTPPROXY_USER_SECRETFILE=/run/secrets/httpproxy_user \
HTTPPROXY_PASSWORD_SECRETFILE=/run/secrets/httpproxy_password \
# Shadowsocks
SHADOWSOCKS=off \
SHADOWSOCKS_LOG=off \
SHADOWSOCKS_PORT=8388 \
SHADOWSOCKS_PASSWORD= \
SHADOWSOCKS_PASSWORD_SECRETFILE=/run/secrets/shadowsocks_password \
SHADOWSOCKS_METHOD=chacha20-ietf-poly1305 \
UPDATER_PERIOD=0
ENTRYPOINT ["/entrypoint"]
EXPOSE 8000/tcp 8888/tcp 8388/tcp 8388/udp
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=1 CMD /entrypoint healthcheck
RUN apk add -q --progress --no-cache --update openvpn ca-certificates iptables ip6tables unbound tzdata && \
rm -rf /var/cache/apk/* /etc/unbound/* /usr/sbin/unbound-* && \
deluser openvpn && \
deluser unbound && \
mkdir /gluetun
# TODO remove once SAN is added to PIA servers certificates, see https://github.com/pia-foss/manual-connections/issues/10
COPY --from=build /tmp/gobuild/entrypoint /entrypoint

395
README.md
View File

@@ -1,340 +1,119 @@
# Private Internet Access Client
# Gluetun VPN client
*Lightweight swiss-knife-like VPN client to tunnel to private internet access servers, using OpenVPN, iptables, DNS over TLS, ShadowSocks, Tinyproxy and more*
*Lightweight swiss-knife-like VPN client to tunnel to Cyberghost, FastestVPN,
HideMyAss, Mullvad, NordVPN, Privado, Private Internet Access, PrivateVPN,
ProtonVPN, PureVPN, Surfshark, TorGuard, VyprVPN and Windscribe VPN servers
using Go, OpenVPN, iptables, DNS over TLS, ShadowSocks and an HTTP proxy*
**ANNOUCEMENT**: *Total rewrite in Go: see the new features [below](#Features)* (in case something break use the image with tag `:old`)
**ANNOUNCEMENT**:
<a href="https://hub.docker.com/r/qmcgaw/private-internet-access">
<img width="100%" height="320" src="https://raw.githubusercontent.com/qdm12/private-internet-access-docker/master/title.svg?sanitize=true">
</a>
<img height="250" src="https://raw.githubusercontent.com/qdm12/gluetun/master/title.svg?sanitize=true">
[![Size](https://img.shields.io/docker/image-size/qmcgaw/gluetun?sort=semver&label=Last%20released%20image)](https://hub.docker.com/r/qmcgaw/gluetun/tags?page=1&ordering=last_updated)
[![Size](https://img.shields.io/docker/image-size/qmcgaw/gluetun/latest?label=Latest%20image)](https://hub.docker.com/r/qmcgaw/gluetun/tags)
[![Build Status](https://travis-ci.org/qdm12/private-internet-access-docker.svg?branch=master)](https://travis-ci.org/qdm12/private-internet-access-docker)
[![Docker Pulls](https://img.shields.io/docker/pulls/qmcgaw/private-internet-access.svg)](https://hub.docker.com/r/qmcgaw/private-internet-access)
[![Docker Stars](https://img.shields.io/docker/stars/qmcgaw/private-internet-access.svg)](https://hub.docker.com/r/qmcgaw/private-internet-access)
[![Docker Pulls](https://img.shields.io/docker/pulls/qmcgaw/gluetun.svg)](https://hub.docker.com/r/qmcgaw/gluetun)
[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/private-internet-access-docker.svg)](https://github.com/qdm12/private-internet-access-docker/issues)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/private-internet-access-docker.svg)](https://github.com/qdm12/private-internet-access-docker/issues)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/private-internet-access-docker.svg)](https://github.com/qdm12/private-internet-access-docker/issues)
![Last release](https://img.shields.io/github/release/qdm12/gluetun?label=Last%20release)
![Last Docker tag](https://img.shields.io/docker/v/qmcgaw/gluetun?sort=semver&label=Last%20Docker%20tag)
![GitHub Release Date](https://img.shields.io/github/release-date/qdm12/gluetun?label=Last%20release%20date)
[![Image size](https://images.microbadger.com/badges/image/qmcgaw/private-internet-access.svg)](https://microbadger.com/images/qmcgaw/private-internet-access)
[![Image version](https://images.microbadger.com/badges/version/qmcgaw/private-internet-access.svg)](https://microbadger.com/images/qmcgaw/private-internet-access)
[![Join Slack channel](https://img.shields.io/badge/slack-@qdm12-yellow.svg?logo=slack)](https://join.slack.com/t/qdm12/shared_invite/enQtOTE0NjcxNTM1ODc5LTYyZmVlOTM3MGI4ZWU0YmJkMjUxNmQ4ODQ2OTAwYzMxMTlhY2Q1MWQyOWUyNjc2ODliNjFjMDUxNWNmNzk5MDk)
![Commits since release](https://img.shields.io/github/commits-since/qdm12/gluetun/latest?sort=semver)
[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/gluetun.svg)](https://github.com/qdm12/gluetun/commits)
<details><summary>Click to show base components</summary><p>
[![Lines of code](https://img.shields.io/tokei/lines/github/qdm12/gluetun)](https://github.com/qdm12/gluetun)
- [Alpine 3.11](https://alpinelinux.org) for a tiny image (37MB of packages, 6.7MB of Go binary and 5.6MB for Alpine)
- [OpenVPN 2.4.8](https://pkgs.alpinelinux.org/package/v3.11/main/x86_64/openvpn) to tunnel to PIA servers
- [IPtables 1.8.3](https://pkgs.alpinelinux.org/package/v3.11/main/x86_64/iptables) enforces the container to communicate only through the VPN or with other containers in its virtual network (acts as a killswitch)
- [Unbound 1.9.6](https://pkgs.alpinelinux.org/package/v3.11/main/x86_64/unbound) configured with Cloudflare's [1.1.1.1](https://1.1.1.1) DNS over TLS (configurable with 5 different providers)
- [Files and blocking lists built periodically](https://github.com/qdm12/updated/tree/master/files) used with Unbound (see `BLOCK_MALICIOUS`, `BLOCK_SURVEILLANCE` and `BLOCK_ADS` environment variables)
- [TinyProxy 1.10.0](https://pkgs.alpinelinux.org/package/v3.11/main/x86_64/tinyproxy)
- [Shadowsocks 3.3.4](https://pkgs.alpinelinux.org/package/edge/testing/x86/shadowsocks-libev)
## Quick links
</p></details>
- Problem or suggestion?
- [Start a discussion](https://github.com/qdm12/gluetun/discussions)
- [Create an issue](https://github.com/qdm12/gluetun/issues)
- [Check the Wiki](https://github.com/qdm12/gluetun/wiki)
- [Join the Slack channel](https://join.slack.com/t/qdm12/shared_invite/enQtOTE0NjcxNTM1ODc5LTYyZmVlOTM3MGI4ZWU0YmJkMjUxNmQ4ODQ2OTAwYzMxMTlhY2Q1MWQyOWUyNjc2ODliNjFjMDUxNWNmNzk5MDk)
- Happy?
- Sponsor me on [github.com/sponsors/qdm12](https://github.com/sponsors/qdm12)
- Donate to [paypal.me/qmcgaw](https://www.paypal.me/qmcgaw)
- Drop me [an email](mailto:quentin.mcgaw@gmail.com)
## Features
- **New features**
- Choice to block ads, malicious and surveillance at the DNS level
- All program output streams are merged (openvpn, unbound, shadowsocks, tinyproxy, etc.)
- Choice of DNS over TLS provider(s)
- Possibility of split horizon DNS by selecting multiple DNS over TLS providers
- Download block lists and cryptographic files at start instead of at build time
- Can work as a Kubernetes sidecar container, thanks @rorph
- Pick a random region if no region is given, thanks @rorph
- <details><summary>Configure everything with environment variables</summary><p>
- [Destination region](https://www.privateinternetaccess.com/pages/network)
- Internet protocol
- Level of encryption
- PIA Username and password
- DNS over TLS
- DNS blocking: ads, malicious, surveillance
- Internal firewall
- Socks5 proxy
- Web HTTP proxy
</p></details>
- Connect
- [Other containers to it](https://github.com/qdm12/private-internet-access-docker#connect-to-it)
- [LAN devices to it](https://github.com/qdm12/private-internet-access-docker#connect-to-it)
- Killswitch using *iptables* to allow traffic only with needed PIA servers and LAN devices
- Port forwarding
- Compatible with amd64, i686 (32 bit), **ARM** 64 bit, ARM 32 bit v6 and v7, ppc64le and even that s390x 🎆
- Sub programs drop root privileges once launched: Openvpn, Unbound, Shadowsocks, Tinyproxy
- Based on Alpine 3.13 for a small Docker image of 52MB
- Supports: **Cyberghost**, **FastestVPN**, **HideMyAss**, **Mullvad**, **NordVPN**, **Privado**, **Private Internet Access**, **PrivateVPN**, **ProtonVPN**, **PureVPN**, **Surfshark**, **TorGuard**, **Vyprvpn**, **Windscribe** servers
- Supports Openvpn only for now
- DNS over TLS baked in with service provider(s) of your choice
- DNS fine blocking of malicious/ads/surveillance hostnames and IP addresses, with live update every 24 hours
- Choose the vpn network protocol, `udp` or `tcp`
- Built in firewall kill switch to allow traffic only with needed the VPN servers and LAN devices
- Built in Shadowsocks proxy (protocol based on SOCKS5 with an encryption layer, tunnels TCP+UDP)
- Built in HTTP proxy (tunnels HTTP and HTTPS through TCP)
- [Connect other containers to it](https://github.com/qdm12/gluetun/wiki/Connect-to-gluetun)
- [Connect LAN devices to it](https://github.com/qdm12/gluetun/wiki/Connect-to-gluetun)
- Compatible with amd64, i686 (32 bit), **ARM** 64 bit, ARM 32 bit v6 and v7, and even ppc64le 🎆
- VPN server side port forwarding for Private Internet Access and Vyprvpn
- Possibility of split horizon DNS by selecting multiple DNS over TLS providers
- Subprograms all drop root privileges once launched
- Subprograms output streams are all merged together
- Can work as a Kubernetes sidecar container, thanks @rorph
## Setup
1. <details><summary>Requirements</summary><p>
- A Private Internet Access **username** and **password** - [Sign up](https://www.privateinternetaccess.com/pages/buy-vpn/)
- Docker API 1.25 to support `init`
- If you use Docker Compose, docker-compose >= 1.22.0, to support `init: true`
- <details><summary>External firewall requirements, if you have one</summary><p>
- At start only
- Allow outbound TCP 443 to github.com and privateinternetaccess.com
- If `DOT=on`, allow outbound TCP 853 to 1.1.1.1 to allow Unbound to resolve the PIA domain name.
- If `DOT=off`, allow outbound UDP 53 to your DNS provider to resolve the PIA domain name.
- For UDP strong encryption, allow outbound UDP 1197 to the corresponding VPN server IPs
- For UDP normal encryption, allow outbound UDP 1198 to the corresponding VPN server IPs
- For TCP strong encryption, allow outbound TCP 501 to the corresponding VPN server IPs
- For TCP normal encryption, allow outbound TCP 502 to the corresponding VPN server IPs
- If `SHADOWSOCKS=on`, allow inbound TCP 8388 and UDP 8388 from your LAN
- If `TINYPROXY=on`, allow inbound TCP 8888 from your LAN
</p></details>
</p></details>
1. On some devices you may need to setup your tunnel kernel module on your host with `insmod /lib/modules/tun.ko` or `modprobe tun`
- [Synology users Wiki page](https://github.com/qdm12/gluetun/wiki/Synology-setup)
1. ⚠️ Raspberry Pi users running 32 bit systems: from image `v3.16.0` you need to do [this](https://github.com/alpinelinux/docker-alpine/issues/135#issuecomment-812287338) on your host to run the container.
1. Launch the container with:
```bash
docker run -d --init --name=pia --cap-add=NET_ADMIN \
-e REGION="CA Montreal" -e USER=js89ds7 -e PASSWORD=8fd9s239G \
qmcgaw/private-internet-access
docker run -d --name gluetun --cap-add=NET_ADMIN \
-e VPNSP="private internet access" -e REGION="CA Montreal" \
-e OPENVPN_USER=js89ds7 -e OPENVPN_PASSWORD=8fd9s239G \
-v /yourpath:/gluetun \
qmcgaw/gluetun
```
or use [docker-compose.yml](https://github.com/qdm12/private-internet-access-docker/blob/master/docker-compose.yml) with:
or use [docker-compose.yml](https://github.com/qdm12/gluetun/blob/master/docker-compose.yml) with:
```bash
echo "your openvpn username" > openvpn_user
echo "your openvpn password" > openvpn_password
docker-compose up -d
```
Note that you can:
- Change the many [environment variables](#environment-variables) available
- Use `-p 8888:8888/tcp` to access the HTTP web proxy (and put your LAN in `EXTRA_SUBNETS` environment variable)
- Use `-p 8388:8388/tcp -p 8388:8388/udp` to access the SOCKS5 proxy (and put your LAN in `EXTRA_SUBNETS` environment variable)
- Pass additional arguments to *openvpn* using Docker's command function (commands after the image name)
1. You can update the image with `docker pull qmcgaw/private-internet-access:latest`. There are also docker tags available:
- `qmcgaw/private-internet-access:v1` linked to the [v1 release](https://github.com/qdm12/private-internet-access-docker/releases/tag/v1.0)
You should probably check the many [environment variables](https://github.com/qdm12/gluetun/wiki/Environment-variables) available to adapt the container to your needs.
## Testing
## Further setup
Check the PIA IP address matches your expectations
The following points are all optional but should give you insights on all the possibilities with this container.
```sh
docker run --rm --network=container:pia alpine:3.10 wget -qO- https://ipinfo.io
```
## Environment variables
| Environment variable | Default | Description |
| --- | --- | --- |
| `REGION` | `CA Montreal` | One of the [PIA regions](https://www.privateinternetaccess.com/pages/network/) |
| `PROTOCOL` | `udp` | `tcp` or `udp` |
| `ENCRYPTION` | `strong` | `normal` or `strong` |
| `USER` | | Your PIA username |
| `PASSWORD` | | Your PIA password |
| `DOT` | `on` | `on` or `off`, to activate DNS over TLS to 1.1.1.1 |
| `DOT_PROVIDERS` | `cloudflare` | Comma delimited list of DNS over TLS providers from `cloudflare`, `google`, `quad9`, `quadrant`, `cleanbrowsing`, `securedns`, `libredns` |
| `DOT_CACHING` | `on` | Unbound caching feature, `on` or `off` |
| `DOT_PRIVATE_ADDRESS` | All IPv4 and IPv6 CIDRs private ranges | Comma separated list of CIDRs or single IP addresses. Note that the default setting prevents DNS rebinding |
| `DOT_VERBOSITY` | `1` | Unbound verbosity level from `0` to `5` (full debug) |
| `DOT_VERBOSITY_DETAILS` | `0` | Unbound details verbosity level from `0` to `4` |
| `DOT_VALIDATION_LOGLEVEL` | `0` | Unbound validation log level from `0` to `2` |
| `BLOCK_MALICIOUS` | `on` | `on` or `off`, blocks malicious hostnames and IPs |
| `BLOCK_SURVEILLANCE` | `off` | `on` or `off`, blocks surveillance hostnames and IPs |
| `BLOCK_ADS` | `off` | `on` or `off`, blocks ads hostnames and IPs |
| `UNBLOCK` | | comma separated string (i.e. `web.com,web2.ca`) to unblock hostnames |
| `EXTRA_SUBNETS` | | comma separated subnets allowed in the container firewall (i.e. `192.168.1.0/24,192.168.10.121,10.0.0.5/28`) |
| `PORT_FORWARDING` | `off` | Set to `on` to forward a port on PIA server |
| `PORT_FORWARDING_STATUS_FILE` | `/forwarded_port` | File path to store the forwarded port number |
| `TINYPROXY` | `off` | `on` or `off`, to enable the internal HTTP proxy tinyproxy |
| `TINYPROXY_LOG` | `Info` | `Info`, `Connect`, `Notice`, `Warning`, `Error` or `Critical` |
| `TINYPROXY_PORT` | `8888` | `1024` to `65535` internal port for HTTP proxy |
| `TINYPROXY_USER` | | Username to use to connect to the HTTP proxy |
| `TINYPROXY_PASSWORD` | | Passsword to use to connect to the HTTP proxy |
| `SHADOWSOCKS` | `off` | `on` or `off`, to enable the internal SOCKS5 proxy Shadowsocks |
| `SHADOWSOCKS_LOG` | `on` | `on` or `off` to enable logging for Shadowsocks |
| `SHADOWSOCKS_PORT` | `8388` | `1024` to `65535` internal port for SOCKS5 proxy |
| `SHADOWSOCKS_PASSWORD` | | Passsword to use to connect to the SOCKS5 proxy |
| `TZ` | | Specify a timezone to use i.e. `Europe/London` |
## Connect to it
There are various ways to achieve this, depending on your use case.
- <details><summary>Connect containers in the same docker-compose.yml as PIA</summary><p>
Add `network_mode: "service:pia"` to your *docker-compose.yml* (no need for `depends_on`)
</p></details>
- <details><summary>Connect other containers to PIA</summary><p>
Add `--network=container:pia` when launching the container, provided PIA is already running
</p></details>
- <details><summary>Connect containers from another docker-compose.yml</summary><p>
Add `network_mode: "container:pia"` to your *docker-compose.yml*, provided PIA is already running
</p></details>
- <details><summary>Connect LAN devices through the built-in HTTP proxy *Tinyproxy* (i.e. with Chrome, Kodi, etc.)</summary><p>
You might want to use Shadowsocks instead which tunnels UDP as well as TCP, whereas Tinyproxy only tunnels TCP.
1. Setup a HTTP proxy client, such as [SwitchyOmega for Chrome](https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en)
1. Ensure the PIA container is launched with:
- port `8888` published `-p 8888:8888/tcp`
- your LAN subnet, i.e. `192.168.1.0/24`, set as `-e EXTRA_SUBNETS=192.168.1.0/24`
1. With your HTTP proxy client, connect to the Docker host (i.e. `192.168.1.10`) on port `8888`. You need to enter your credentials if you set them with `TINYPROXY_USER` and `TINYPROXY_PASSWORD`.
1. If you set `TINYPROXY_LOG` to `Info`, more information will be logged in the Docker logs
</p></details>
- <details><summary>Connect LAN devices through the built-in SOCKS5 proxy *Shadowsocks* (per app, system wide, etc.)</summary><p>
1. Setup a SOCKS5 proxy client, there is a list of [ShadowSocks clients for **all platforms**](https://shadowsocks.org/en/download/clients.html)
- **note** some clients do not tunnel UDP so your DNS queries will be done locally and not through PIA and its built in DNS over TLS
- Clients that support such UDP tunneling are, as far as I know:
- iOS: Potatso Lite
- OSX: ShadowsocksX
- Android: Shadowsocks by Max Lv
1. Ensure the PIA container is launched with:
- port `8388` published `-p 8388:8388/tcp -p 8388:8388/udp`
- your LAN subnet, i.e. `192.168.1.0/24`, set as `-e EXTRA_SUBNETS=192.168.1.0/24`
1. With your SOCKS5 proxy client
- Enter the Docker host (i.e. `192.168.1.10`) as the server IP
- Enter port TCP (and UDP, if available) `8388` as the server port
- Use the password you have set with `SHADOWSOCKS_PASSWORD`
- Choose the encryption method/algorithm `chacha20-ietf-poly1305`
1. If you set `SHADOWSOCKS_LOG` to `on`, more information will be logged in the Docker logs
</p></details>
- <details><summary>Access ports of containers connected to PIA</summary><p>
In example, to access port `8000` of container `xyz` and `9000` of container `abc` connected to PIA,
publish ports `8000` and `9000` for the PIA container and access them as you would with any other container
</p></details>
- <details><summary>Access ports of containers connected to PIA, all in the same docker-compose.yml</summary><p>
In example, to access port `8000` of container `xyz` and `9000` of container `abc` connected to PIA, publish port `8000` and `9000` for the PIA container.
The docker-compose.yml file would look like:
```yml
version: '3.7'
services:
pia:
image: qmcgaw/private-internet-access
container_name: pia
init: true
cap_add:
- NET_ADMIN
environment:
- USER=js89ds7
- PASSWORD=8fd9s239G
ports:
- 8000:8000/tcp
- 9000:9000/tcp
abc:
image: abc
container_name: abc
network_mode: "service:pia"
xyz:
image: xyz
container_name: xyz
network_mode: "service:pia"
```
</p></details>
## Port forwarding
By setting `PORT_FORWARDING` environment variable to `on`, the forwarded port will be read and written to the file specified in `PORT_FORWARDING_STATUS_FILE` (by default, this is set to `/forwarded_port`). If the location for this file does not exist, it will be created automatically.
You can mount this file as a volume to read it from other containers.
Note that not all regions support port forwarding.
## For the paranoids
- You can review the code which consists in:
- [Dockerfile](https://github.com/qdm12/private-internet-access-docker/blob/master/Dockerfile)
- [main.go](https://github.com/qdm12/private-internet-access-docker/blob/master/cmd/main.go), the main code entrypoint
- [internal package](https://github.com/qdm12/private-internet-access-docker/blob/master/internal)
- [github.com/qdm12/golibs](https://github.com/qdm12/golibs) dependency
- [github.com/qdm12/files](https://github.com/qdm12/files) for files downloaded at start (DNS root hints, block lists, etc.)
- Build the image yourself:
```bash
docker build -t qmcgaw/private-internet-access https://github.com/qdm12/private-internet-access-docker.git
```
- The download and parsing of all needed files is done at start (openvpn config files, Unbound files, block lists, etc.)
- Use `-e ENCRYPTION=strong -e BLOCK_MALICIOUS=on`
- You can test DNSSEC using [internet.nl/connection](https://www.internet.nl/connection/)
- Check DNS leak tests with [https://www.dnsleaktest.com](https://www.dnsleaktest.com)
- DNS Leaks tests might not work because of [this](https://github.com/qdm12/cloudflare-dns-server#verify-dns-connection) (*TLDR*: DNS server is a local caching intermediary)
## Troubleshooting
- If openvpn fails to start, you may need to:
- Install the tun kernel module on your host with `insmod /lib/modules/tun.ko` or `modprobe tun`
- Add `--device=/dev/net/tun` to your docker run command (equivalent for docker-compose, kubernetes, etc.)
- Fallback to a previous Docker image tags:
- `v1` tag, stable shell scripting based (no support)
- `old` tag, latest shell scripting version (no support)
- `v2`... waiting for `latest` to become more stable
- Fallback to a precise previous version
1. Clone the repository on your machine
```sh
git clone https://github.com/qdm12/private-internet-access-docker.git pia
cd pia
```
1. Look up which commit you want to go back to [here](https://github.com/qdm12/private-internet-access-docker/commits/master), i.e. `942cc7d4d10545b6f5f89c907b7dd1dbc39368e0`
1. Revert to this commit locally
```sh
git reset --hard 942cc7d4d10545b6f5f89c907b7dd1dbc39368e0
```
1. Build the Docker image
```sh
docker build -t qmcgaw/private-internet-access .
```
## Development
### Using VSCode and Docker
1. Install [Docker](https://docs.docker.com/install)
- On Windows, share a drive with Docker Desktop and have the project on that partition
1. With [Visual Studio Code](https://code.visualstudio.com/download), install the [remote containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
1. In Visual Studio Code, press on `F1` and select `Remote-Containers: Open Folder in Container...`
1. Your dev environment is ready to go!... and it's running in a container :+1:
## TODOs
- Support other VPN providers
- Mullvad
- Windscribe
- Gotify support for notificactions
- Periodic update of malicious block lists with Unbound restart
- Improve healthcheck
- Check IP address belongs to selected region
- Check for DNS provider somehow if this is even possible
- Support for other VPN protocols
- Wireguard (wireguard-go)
- Show new versions/commits at start
- Colors & emojis
- Setup
- Logging streams
- More unit tests
- Write in Go
- DNS over TLS to replace Unbound
- HTTP proxy to replace tinyproxy
- use [go-Shadowsocks2](https://github.com/shadowsocks/go-shadowsocks2)
- DNS over HTTPS, maybe use [github.com/likexian/doh-go](https://github.com/likexian/doh-go)
- use [iptables-go](https://github.com/coreos/go-iptables) to replace iptables
- wireguard-go
- Openvpn to replace openvpn
- Use [Docker secrets](https://github.com/qdm12/gluetun/wiki/Docker-secrets) to read your credentials instead of environment variables
- [Test your setup](https://github.com/qdm12/gluetun/wiki/Test-your-setup)
- [How to connect other containers and devices to Gluetun](https://github.com/qdm12/gluetun/wiki/Connect-to-gluetun)
- [VPN server side port forwarding](https://github.com/qdm12/gluetun/wiki/Port-forwarding)
- [HTTP control server](https://github.com/qdm12/gluetun/wiki/HTTP-Control-server) to automate things, restart Openvpn etc.
- Update the image with `docker pull qmcgaw/gluetun:latest`. See this [Wiki document](https://github.com/qdm12/gluetun/wiki/Docker-image-tags) for Docker tags available.
## License
This repository is under an [MIT license](https://github.com/qdm12/private-internet-access-docker/master/license)
[![MIT](https://img.shields.io/github/license/qdm12/gluetun)](https://github.com/qdm12/gluetun/master/LICENSE)
## Metadata
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/gluetun.svg)](https://github.com/qdm12/gluetun/commits)
[![GitHub closed PRs](https://img.shields.io/github/issues-pr-closed/qdm12/gluetun.svg)](https://github.com/qdm12/gluetun/pulls?q=is%3Apr+is%3Aclosed)
[![GitHub issues](https://img.shields.io/github/issues/qdm12/gluetun.svg)](https://github.com/qdm12/gluetun/issues)
[![GitHub closed issues](https://img.shields.io/github/issues-closed/qdm12/gluetun.svg)](https://github.com/qdm12/gluetun/issues?q=is%3Aissue+is%3Aclosed)
![Visitors count](https://visitor-badge.laobi.icu/badge?page_id=gluetun.readme)
![GitHub stars](https://img.shields.io/github/stars/qdm12/gluetun?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/qdm12/gluetun?style=social)
![Contributors](https://img.shields.io/github/contributors/qdm12/gluetun)
![GitHub forks](https://img.shields.io/github/forks/qdm12/gluetun?style=social)
![Code size](https://img.shields.io/github/languages/code-size/qdm12/gluetun)
![GitHub repo size](https://img.shields.io/github/repo-size/qdm12/gluetun)
[![dockeri.co](https://dockeri.co/image/qmcgaw/gluetun)](https://hub.docker.com/r/qmcgaw/gluetun)
![Docker Layers for latest](https://img.shields.io/microbadger/layers/qmcgaw/gluetun/latest?label=Docker%20image%20layers)
![Go version](https://img.shields.io/github/go-mod/go-version/qdm12/gluetun)

21
ci.sh
View File

@@ -1,21 +0,0 @@
#!/bin/bash
if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \
.
exit $?
fi
echo $DOCKER_PASSWORD | docker login -u qmcgaw --password-stdin &> /dev/null
TAG="${TRAVIS_TAG:-latest}"
echo "Building Docker images for \"$DOCKER_REPO:$TAG\""
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=$TAG \
-t $DOCKER_REPO:$TAG \
--push \
.

413
cmd/gluetun/main.go Normal file
View File

@@ -0,0 +1,413 @@
package main
import (
"context"
"fmt"
"net"
"net/http"
nativeos "os"
"os/signal"
"sync"
"syscall"
"time"
"github.com/qdm12/dns/pkg/unbound"
"github.com/qdm12/gluetun/internal/alpine"
"github.com/qdm12/gluetun/internal/cli"
"github.com/qdm12/gluetun/internal/configuration"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/dns"
"github.com/qdm12/gluetun/internal/firewall"
"github.com/qdm12/gluetun/internal/healthcheck"
"github.com/qdm12/gluetun/internal/httpproxy"
gluetunLogging "github.com/qdm12/gluetun/internal/logging"
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/internal/openvpn"
"github.com/qdm12/gluetun/internal/publicip"
"github.com/qdm12/gluetun/internal/routing"
"github.com/qdm12/gluetun/internal/server"
"github.com/qdm12/gluetun/internal/shadowsocks"
"github.com/qdm12/gluetun/internal/storage"
"github.com/qdm12/gluetun/internal/unix"
"github.com/qdm12/gluetun/internal/updater"
versionpkg "github.com/qdm12/gluetun/internal/version"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/os/user"
"github.com/qdm12/golibs/params"
"github.com/qdm12/updated/pkg/dnscrypto"
)
//nolint:gochecknoglobals
var (
version = "unknown"
commit = "unknown"
buildDate = "an unknown date"
)
func main() {
buildInfo := models.BuildInformation{
Version: version,
Commit: commit,
BuildDate: buildDate,
}
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
logger := logging.New(logging.StdLog)
args := nativeos.Args
os := os.New()
osUser := user.New()
unix := unix.New()
cli := cli.New()
errorCh := make(chan error)
go func() {
errorCh <- _main(ctx, buildInfo, args, logger, os, osUser, unix, cli)
}()
signalsCh := make(chan nativeos.Signal, 1)
signal.Notify(signalsCh,
syscall.SIGINT,
syscall.SIGTERM,
nativeos.Interrupt,
)
select {
case signal := <-signalsCh:
logger.Warn("Caught OS signal %s, shutting down", signal)
case err := <-errorCh:
close(errorCh)
if err == nil { // expected exit such as healthcheck
nativeos.Exit(0)
}
logger.Error(err)
}
cancel()
const shutdownGracePeriod = 5 * time.Second
timer := time.NewTimer(shutdownGracePeriod)
select {
case <-errorCh:
if !timer.Stop() {
<-timer.C
}
logger.Info("Shutdown successful")
case <-timer.C:
logger.Warn("Shutdown timed out")
}
nativeos.Exit(1)
}
//nolint:gocognit,gocyclo
func _main(ctx context.Context, buildInfo models.BuildInformation,
args []string, logger logging.Logger, os os.OS, osUser user.OSUser, unix unix.Unix,
cli cli.CLI) error {
if len(args) > 1 { // cli operation
switch args[1] {
case "healthcheck":
return cli.HealthCheck(ctx)
case "clientkey":
return cli.ClientKey(args[2:], os.OpenFile)
case "openvpnconfig":
return cli.OpenvpnConfig(os)
case "update":
return cli.Update(ctx, args[2:], os)
default:
return fmt.Errorf("command %q is unknown", args[1])
}
}
ctx, cancel := context.WithCancel(ctx)
defer cancel()
const clientTimeout = 15 * time.Second
httpClient := &http.Client{Timeout: clientTimeout}
// Create configurators
alpineConf := alpine.NewConfigurator(os.OpenFile, osUser)
ovpnConf := openvpn.NewConfigurator(logger, os, unix)
dnsCrypto := dnscrypto.New(httpClient, "", "")
const cacertsPath = "/etc/ssl/certs/ca-certificates.crt"
dnsConf := unbound.NewConfigurator(logger, os.OpenFile, dnsCrypto,
"/etc/unbound", "/usr/sbin/unbound", cacertsPath)
routingConf := routing.NewRouting(logger)
firewallConf := firewall.NewConfigurator(logger, routingConf, os.OpenFile)
fmt.Println(gluetunLogging.Splash(buildInfo))
printVersions(ctx, logger, map[string]func(ctx context.Context) (string, error){
"OpenVPN": ovpnConf.Version,
"Unbound": dnsConf.Version,
"IPtables": firewallConf.Version,
})
var allSettings configuration.Settings
err := allSettings.Read(params.NewEnv(), os, logger.NewChild(logging.SetPrefix("configuration: ")))
if err != nil {
return err
}
logger.Info(allSettings.String())
if err := os.MkdirAll("/tmp/gluetun", 0644); err != nil {
return err
}
if err := os.MkdirAll("/gluetun", 0644); err != nil {
return err
}
// TODO run this in a loop or in openvpn to reload from file without restarting
storage := storage.New(logger, os, constants.ServersData)
allServers, err := storage.SyncServers(constants.GetAllServers())
if err != nil {
return err
}
// Should never change
puid, pgid := allSettings.System.PUID, allSettings.System.PGID
const defaultUsername = "nonrootuser"
nonRootUsername, err := alpineConf.CreateUser(defaultUsername, puid)
if err != nil {
return err
}
if nonRootUsername != defaultUsername {
logger.Info("using existing username %s corresponding to user id %d", nonRootUsername, puid)
}
if err := os.Chown("/etc/unbound", puid, pgid); err != nil {
return err
}
if allSettings.Firewall.Debug {
firewallConf.SetDebug()
routingConf.SetDebug()
}
defaultInterface, defaultGateway, err := routingConf.DefaultRoute()
if err != nil {
return err
}
localNetworks, err := routingConf.LocalNetworks()
if err != nil {
return err
}
defaultIP, err := routingConf.DefaultIP()
if err != nil {
return err
}
firewallConf.SetNetworkInformation(defaultInterface, defaultGateway, localNetworks, defaultIP)
if err := routingConf.Setup(); err != nil {
return err
}
defer func() {
routingConf.SetVerbose(false)
if err := routingConf.TearDown(); err != nil {
logger.Error(err)
}
}()
if err := firewallConf.SetOutboundSubnets(ctx, allSettings.Firewall.OutboundSubnets); err != nil {
return err
}
if err := routingConf.SetOutboundRoutes(allSettings.Firewall.OutboundSubnets); err != nil {
return err
}
if err := ovpnConf.CheckTUN(); err != nil {
logger.Warn(err)
err = ovpnConf.CreateTUN()
if err != nil {
return err
}
}
tunnelReadyCh := make(chan struct{})
defer close(tunnelReadyCh)
if allSettings.Firewall.Enabled {
err := firewallConf.SetEnabled(ctx, true) // disabled by default
if err != nil {
return err
}
}
for _, vpnPort := range allSettings.Firewall.VPNInputPorts {
err = firewallConf.SetAllowedPort(ctx, vpnPort, string(constants.TUN))
if err != nil {
return err
}
}
for _, port := range allSettings.Firewall.InputPorts {
err = firewallConf.SetAllowedPort(ctx, port, defaultInterface)
if err != nil {
return err
}
} // TODO move inside firewall?
wg := &sync.WaitGroup{}
healthy := make(chan bool)
openvpnLooper := openvpn.NewLooper(allSettings.OpenVPN, nonRootUsername, puid, pgid, allServers,
ovpnConf, firewallConf, routingConf, logger, httpClient, os.OpenFile, tunnelReadyCh, healthy, cancel)
wg.Add(1)
// wait for restartOpenvpn
go openvpnLooper.Run(ctx, wg)
updaterLooper := updater.NewLooper(allSettings.Updater,
allServers, storage, openvpnLooper.SetServers, httpClient, logger)
wg.Add(1)
// wait for updaterLooper.Restart() or its ticket launched with RunRestartTicker
go updaterLooper.Run(ctx, wg)
unboundLooper := dns.NewLooper(dnsConf, allSettings.DNS, httpClient,
logger, nonRootUsername, puid, pgid)
wg.Add(1)
// wait for unboundLooper.Restart or its ticker launched with RunRestartTicker
go unboundLooper.Run(ctx, wg)
publicIPLooper := publicip.NewLooper(
httpClient, logger, allSettings.PublicIP, puid, pgid, os)
wg.Add(1)
go publicIPLooper.Run(ctx, wg)
wg.Add(1)
go publicIPLooper.RunRestartTicker(ctx, wg)
httpProxyLooper := httpproxy.NewLooper(logger, allSettings.HTTPProxy)
wg.Add(1)
go httpProxyLooper.Run(ctx, wg)
shadowsocksLooper := shadowsocks.NewLooper(allSettings.ShadowSocks, logger)
wg.Add(1)
go shadowsocksLooper.Run(ctx, wg)
wg.Add(1)
go routeReadyEvents(ctx, wg, buildInfo, tunnelReadyCh,
unboundLooper, updaterLooper, publicIPLooper, routingConf, logger, httpClient,
allSettings.VersionInformation, allSettings.OpenVPN.Provider.PortForwarding.Enabled, openvpnLooper.PortForward,
)
controlServerAddress := fmt.Sprintf("0.0.0.0:%d", allSettings.ControlServer.Port)
controlServerLogging := allSettings.ControlServer.Log
httpServer := server.New(controlServerAddress, controlServerLogging,
logger, buildInfo, openvpnLooper, unboundLooper, updaterLooper, publicIPLooper)
wg.Add(1)
go httpServer.Run(ctx, wg)
healthcheckServer := healthcheck.NewServer(
constants.HealthcheckAddress, logger)
wg.Add(1)
go healthcheckServer.Run(ctx, healthy, wg)
// Start openvpn for the first time in a blocking call
// until openvpn is launched
_, _ = openvpnLooper.SetStatus(constants.Running) // TODO option to disable with variable
<-ctx.Done()
if allSettings.OpenVPN.Provider.PortForwarding.Enabled {
logger.Info("Clearing forwarded port status file %s", allSettings.OpenVPN.Provider.PortForwarding.Filepath)
if err := os.Remove(allSettings.OpenVPN.Provider.PortForwarding.Filepath); err != nil {
logger.Error(err)
}
}
if allSettings.Firewall.Enabled {
const enable = false
err := firewallConf.SetEnabled(context.Background(), enable)
if err != nil {
logger.Error(err)
}
}
wg.Wait()
return nil
}
func printVersions(ctx context.Context, logger logging.Logger,
versionFunctions map[string]func(ctx context.Context) (string, error)) {
const timeout = 5 * time.Second
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
for name, f := range versionFunctions {
version, err := f(ctx)
if err != nil {
logger.Error(err)
} else {
logger.Info("%s version: %s", name, version)
}
}
}
func routeReadyEvents(ctx context.Context, wg *sync.WaitGroup, buildInfo models.BuildInformation,
tunnelReadyCh <-chan struct{},
unboundLooper dns.Looper, updaterLooper updater.Looper, publicIPLooper publicip.Looper,
routing routing.Routing, logger logging.Logger, httpClient *http.Client,
versionInformation, portForwardingEnabled bool, startPortForward func(vpnGateway net.IP)) {
defer wg.Done()
tickerWg := &sync.WaitGroup{}
// for linters only
var restartTickerContext context.Context
var restartTickerCancel context.CancelFunc = func() {}
first := true
for {
select {
case <-ctx.Done():
restartTickerCancel() // for linters only
tickerWg.Wait()
return
case <-tunnelReadyCh: // blocks until openvpn is connected
vpnDestination, err := routing.VPNDestinationIP()
if err != nil {
logger.Warn(err)
} else {
logger.Info("VPN routing IP address: %s", vpnDestination)
}
if unboundLooper.GetSettings().Enabled {
_, _ = unboundLooper.SetStatus(constants.Running)
}
restartTickerCancel() // stop previous restart tickers
tickerWg.Wait()
restartTickerContext, restartTickerCancel = context.WithCancel(ctx)
// Runs the Public IP getter job once
_, _ = publicIPLooper.SetStatus(constants.Running)
if !versionInformation {
break
}
if first {
first = false
message, err := versionpkg.GetMessage(ctx, buildInfo, httpClient)
if err != nil {
logger.Error(err)
} else {
logger.Info(message)
}
}
//nolint:gomnd
tickerWg.Add(2)
go unboundLooper.RunRestartTicker(restartTickerContext, tickerWg)
go updaterLooper.RunRestartTicker(restartTickerContext, tickerWg)
if portForwardingEnabled {
// vpnGateway required only for PIA
vpnGateway, err := routing.VPNLocalGatewayIP()
if err != nil {
logger.Error(err)
}
logger.Info("VPN gateway IP address: %s", vpnGateway)
startPortForward(vpnGateway)
}
}
}
}

View File

@@ -1,190 +0,0 @@
package main
import (
"context"
"fmt"
"net"
"os"
"time"
"github.com/qdm12/golibs/command"
"github.com/qdm12/golibs/files"
libhealthcheck "github.com/qdm12/golibs/healthcheck"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/network"
"github.com/qdm12/golibs/signals"
"github.com/qdm12/private-internet-access-docker/internal/constants"
"github.com/qdm12/private-internet-access-docker/internal/dns"
"github.com/qdm12/private-internet-access-docker/internal/env"
"github.com/qdm12/private-internet-access-docker/internal/firewall"
"github.com/qdm12/private-internet-access-docker/internal/healthcheck"
"github.com/qdm12/private-internet-access-docker/internal/openvpn"
"github.com/qdm12/private-internet-access-docker/internal/params"
"github.com/qdm12/private-internet-access-docker/internal/pia"
"github.com/qdm12/private-internet-access-docker/internal/settings"
"github.com/qdm12/private-internet-access-docker/internal/shadowsocks"
"github.com/qdm12/private-internet-access-docker/internal/splash"
"github.com/qdm12/private-internet-access-docker/internal/tinyproxy"
)
const (
uid, gid = 1000, 1000
)
func main() {
logger, err := logging.NewLogger(logging.ConsoleEncoding, logging.InfoLevel, -1)
if err != nil {
panic(err)
}
if libhealthcheck.Mode(os.Args) {
if err := healthcheck.HealthCheck(); err != nil {
fmt.Println(err)
os.Exit(1)
}
os.Exit(0)
}
paramsReader := params.NewParamsReader(logger)
fmt.Println(splash.Splash(paramsReader))
e := env.New(logger)
client := network.NewClient(15 * time.Second)
// Create configurators
fileManager := files.NewFileManager()
ovpnConf := openvpn.NewConfigurator(logger, fileManager)
dnsConf := dns.NewConfigurator(logger, client, fileManager)
firewallConf := firewall.NewConfigurator(logger, fileManager)
piaConf := pia.NewConfigurator(client, fileManager, firewallConf, logger)
tinyProxyConf := tinyproxy.NewConfigurator(fileManager, logger)
shadowsocksConf := shadowsocks.NewConfigurator(fileManager, logger)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
streamMerger := command.NewStreamMerger(ctx)
e.PrintVersion("OpenVPN", ovpnConf.Version)
e.PrintVersion("Unbound", dnsConf.Version)
e.PrintVersion("IPtables", firewallConf.Version)
e.PrintVersion("TinyProxy", tinyProxyConf.Version)
e.PrintVersion("ShadowSocks", shadowsocksConf.Version)
allSettings, err := settings.GetAllSettings(paramsReader)
e.FatalOnError(err)
logger.Info(allSettings.String())
if err := ovpnConf.CheckTUN(); err != nil {
logger.Warn(err)
err = ovpnConf.CreateTUN()
e.FatalOnError(err)
}
err = ovpnConf.WriteAuthFile(allSettings.PIA.User, allSettings.PIA.Password, uid, gid)
e.FatalOnError(err)
// Temporarily reset chain policies allowing Kubernetes sidecar to
// successfully restart the container. Without this, the existing rules will
// pre-exist, preventing the nslookup of the PIA region address. These will
// simply be redundant at Docker runtime as they will already be set this way
// Thanks to @npawelek https://github.com/npawelek
err = firewallConf.AcceptAll()
e.FatalOnError(err)
go func() {
// Blocking line merging reader for all programs: openvpn, tinyproxy, unbound and shadowsocks
logger.Info("Launching standard output merger")
err = streamMerger.CollectLines(func(line string) { logger.Info(line) })
e.FatalOnError(err)
}()
if allSettings.DNS.Enabled {
initialDNSToUse := constants.DNSProviderMapping()[allSettings.DNS.Providers[0]]
dnsConf.UseDNSInternally(initialDNSToUse.IPs[0])
err = dnsConf.DownloadRootHints(uid, gid)
e.FatalOnError(err)
err = dnsConf.DownloadRootKey(uid, gid)
e.FatalOnError(err)
err = dnsConf.MakeUnboundConf(allSettings.DNS, uid, gid)
e.FatalOnError(err)
stream, waitFn, err := dnsConf.Start(allSettings.DNS.VerbosityDetailsLevel)
e.FatalOnError(err)
go func() {
e.FatalOnError(waitFn())
}()
go streamMerger.Merge("unbound", stream)
dnsConf.UseDNSInternally(net.IP{127, 0, 0, 1}) // use Unbound
err = dnsConf.UseDNSSystemWide(net.IP{127, 0, 0, 1}) // use Unbound
e.FatalOnError(err)
err = dnsConf.WaitForUnbound()
e.FatalOnError(err)
}
VPNIPs, port, err := piaConf.BuildConf(allSettings.PIA.Region, allSettings.OpenVPN.NetworkProtocol, allSettings.PIA.Encryption, uid, gid)
e.FatalOnError(err)
defaultInterface, defaultGateway, defaultSubnet, err := firewallConf.GetDefaultRoute()
e.FatalOnError(err)
err = firewallConf.AddRoutesVia(allSettings.Firewall.AllowedSubnets, defaultGateway, defaultInterface)
e.FatalOnError(err)
err = firewallConf.Clear()
e.FatalOnError(err)
err = firewallConf.BlockAll()
e.FatalOnError(err)
err = firewallConf.CreateGeneralRules()
e.FatalOnError(err)
err = firewallConf.CreateVPNRules(constants.TUN, VPNIPs, defaultInterface, port, allSettings.OpenVPN.NetworkProtocol)
e.FatalOnError(err)
err = firewallConf.CreateLocalSubnetsRules(defaultSubnet, allSettings.Firewall.AllowedSubnets, defaultInterface)
e.FatalOnError(err)
if allSettings.TinyProxy.Enabled {
err = tinyProxyConf.MakeConf(allSettings.TinyProxy.LogLevel, allSettings.TinyProxy.Port, allSettings.TinyProxy.User, allSettings.TinyProxy.Password, uid, gid)
e.FatalOnError(err)
err = firewallConf.AllowAnyIncomingOnPort(allSettings.TinyProxy.Port)
e.FatalOnError(err)
stream, waitFn, err := tinyProxyConf.Start()
e.FatalOnError(err)
go func() {
if err := waitFn(); err != nil {
logger.Error(err)
}
}()
go streamMerger.Merge("tinyproxy", stream)
}
if allSettings.ShadowSocks.Enabled {
err = shadowsocksConf.MakeConf(allSettings.ShadowSocks.Port, allSettings.ShadowSocks.Password, uid, gid)
e.FatalOnError(err)
err = firewallConf.AllowAnyIncomingOnPort(allSettings.ShadowSocks.Port)
e.FatalOnError(err)
stream, waitFn, err := shadowsocksConf.Start("0.0.0.0", allSettings.ShadowSocks.Port, allSettings.ShadowSocks.Password, allSettings.ShadowSocks.Log)
e.FatalOnError(err)
go func() {
if err := waitFn(); err != nil {
logger.Error(err)
}
}()
go streamMerger.Merge("shadowsocks", stream)
}
if allSettings.PIA.PortForwarding.Enabled {
time.AfterFunc(10*time.Second, func() {
port, err := piaConf.GetPortForward()
if err != nil {
logger.Error("port forwarding:", err)
}
if err := piaConf.WritePortForward(allSettings.PIA.PortForwarding.Filepath, port); err != nil {
logger.Error("port forwarding:", err)
}
if err := piaConf.AllowPortForwardFirewall(constants.TUN, port); err != nil {
logger.Error("port forwarding:", err)
}
})
}
stream, waitFn, err := ovpnConf.Start()
e.FatalOnError(err)
go streamMerger.Merge("openvpn", stream)
go signals.WaitForExit(func(signal string) int {
logger.Warn("Caught OS signal %s, shutting down", signal)
time.Sleep(100 * time.Millisecond) // wait for other processes to exit
return 0
})
e.FatalOnError(waitFn())
}

1720
doc/logo.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 62 KiB

BIN
doc/logo_256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,37 +1,31 @@
version: "3.7"
services:
pia:
build: https://github.com/qdm12/private-internet-access-docker.git
image: qmcgaw/private-internet-access
container_name: pia
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
network_mode: bridge
init: true
ports:
- 8888:8888/tcp
- 8388:8388/tcp
- 8388:8388/udp
- 8888:8888/tcp # HTTP proxy
- 8388:8388/tcp # Shadowsocks
- 8388:8388/udp # Shadowsocks
- 8000:8000/tcp # Built-in HTTP control server
# command:
volumes:
- /yourpath:/gluetun
secrets:
- openvpn_user
- openvpn_password
environment:
- USER=js89ds7
- PASSWORD=8fd9s239G
- ENCRYPTION=strong
- PROTOCOL=udp
- REGION=CA Montreal
- DOT=on
- DOT_PROVIDERS=cloudflare
- BLOCK_MALICIOUS=on
- BLOCK_SURVEILLANCE=off
- BLOCK_ADS=off
- UNBLOCK=
- EXTRA_SUBNETS=
- TINYPROXY=off
- TINYPROXY_LOG=Info
- TINYPROXY_USER=
- TINYPROXY_PASSWORD=
- SHADOWSOCKS=off
- SHADOWSOCKS_LOG=on
- SHADOWSOCKS_PORT=8388
- SHADOWSOCKS_PASSWORD=
# More variables are available, see the readme table
- VPNSP=private internet access
# Timezone for accurate logs times
- TZ=
restart: always
secrets:
openvpn_user:
file: ./openvpn_user
openvpn_password:
file: ./openvpn_password

18
go.mod
View File

@@ -1,10 +1,16 @@
module github.com/qdm12/private-internet-access-docker
module github.com/qdm12/gluetun
go 1.13
go 1.16
require (
github.com/kyokomi/emoji v2.1.0+incompatible
github.com/qdm12/golibs v0.0.0-20200208153322-66b2eb719e21
github.com/stretchr/testify v1.4.0
golang.org/x/sys v0.0.0-20190412213103-97732733099d
github.com/fatih/color v1.10.0
github.com/golang/mock v1.5.0
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/qdm12/dns v1.4.0
github.com/qdm12/golibs v0.0.0-20210215133151-c711ebd3e56a
github.com/qdm12/ss-server v0.1.0
github.com/qdm12/updated v0.0.0-20210102005021-dd457d77f94a
github.com/stretchr/testify v1.7.0
github.com/vishvananda/netlink v1.1.0
golang.org/x/sys v0.0.0-20201223074533-0d417f636930
)

125
go.sum
View File

@@ -1,113 +1,162 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb h1:D4uzjWwKYQ5XnAvUbuvHW93esHg7F8N/OYeBBcJoTr0=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0 h1:8JV+dzJJiK46XqGLqqLav8ZfEiJECp8jlOFhpiCdZ+0=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.17.2 h1:azEQ8Fnx0jmtFF2fxsnmd6I0x6rsweUF63qqSO1NmKk=
github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonreference v0.17.0 h1:yJW3HCkTHg7NOA+gZ83IPHzUSnUzGXhGmsdiCcMexbA=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/loads v0.17.0 h1:H22nMs3GDQk4SwAaFQ+jLNw+0xoFeCueawhZlv8MBYs=
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
github.com/go-openapi/runtime v0.17.2 h1:/ZK67ikFhQAMFFH/aPu2MaGH7QjP4wHBvHYOVIzDAw0=
github.com/go-openapi/runtime v0.17.2/go.mod h1:QO936ZXeisByFmZEO1IS1Dqhtf4QV1sYYFtIq6Ld86Q=
github.com/go-openapi/spec v0.17.0 h1:XNvrt8FlSVP8T1WuhbAFF6QDhJc0zsoWzX4wXARhhpE=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/strfmt v0.17.0 h1:1isAxYf//QDTnVzbLAMrUK++0k1EjeLJU/gTOR0o3Mc=
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/validate v0.17.0 h1:pqoViQz3YLOGIhAmD0N4Lt6pa/3Gnj3ymKqQwq8iS6U=
github.com/go-openapi/validate v0.17.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gotify/go-api-client/v2 v2.0.4 h1:0w8skCr8aLBDKaQDg31LKKHUGF7rt7zdRpR+6cqIAlE=
github.com/gotify/go-api-client/v2 v2.0.4/go.mod h1:VKiah/UK20bXsr0JObE1eBVLW44zbBouzjuri9iwjFU=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kyokomi/emoji v2.1.0+incompatible h1:+DYU2RgpI6OHG4oQkM5KlqD3Wd3UPEsX8jamTo1Mp6o=
github.com/kyokomi/emoji v2.1.0+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
github.com/kyokomi/emoji v2.2.4+incompatible h1:np0woGKwx9LiHAQmwZx79Oc0rHpNw3o+3evou4BEPv4=
github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc=
github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee h1:P6U24L02WMfj9ymZTxl7CxS73JC99x3ukk+DBkgQGQs=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee/go.mod h1:3uODdxMgOaPYeWU7RzZLxVtJHZ/x1f/iHkBZuKJDzuY=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/qdm12/golibs v0.0.0-20200208153322-66b2eb719e21 h1:Nza/Ar6tPYhDzkiNzbaJZHl4+GUXTqbtjGXuWenkqpQ=
github.com/qdm12/golibs v0.0.0-20200208153322-66b2eb719e21/go.mod h1:YULaFjj6VGmhjak6f35sUWwEleHUmngN5IQ3kdvd6XE=
github.com/qdm12/dns v1.4.0 h1:P8kVMGo7yIEZSk18fA9XQh9faL1CW20aHosWP064MAA=
github.com/qdm12/dns v1.4.0/go.mod h1:WUY4/U8Z2O8888DPrahrIBv8GdYeoIcEy4aUDecZ+UM=
github.com/qdm12/golibs v0.0.0-20201227203847-2fd99ffdfdba/go.mod h1:pikkTN7g7zRuuAnERwqW1yAFq6pYmxrxpjiwGvb0Ysc=
github.com/qdm12/golibs v0.0.0-20210124192933-79a950eaf217/go.mod h1:pikkTN7g7zRuuAnERwqW1yAFq6pYmxrxpjiwGvb0Ysc=
github.com/qdm12/golibs v0.0.0-20210215133151-c711ebd3e56a h1:DxO9jvcQDtWgKSzxL95828kQxO6WCocP9PPpmIqGMRs=
github.com/qdm12/golibs v0.0.0-20210215133151-c711ebd3e56a/go.mod h1:y0qNgur9dTkHK2Bb5tK0UCtYyvEiK08flVIglROmnBg=
github.com/qdm12/ss-server v0.1.0 h1:WV9MkHCDEWRwe4WpnYFeR/zcZAxYoTbfntLDnw9AQ50=
github.com/qdm12/ss-server v0.1.0/go.mod h1:ABVUkxubboL3vqBkOwDV9glX1/x7SnYrckBe5d+M/zw=
github.com/qdm12/updated v0.0.0-20210102005021-dd457d77f94a h1:gkyP+gMEeBgMgyRYGrVNcoy6cL1065IvXsyfB6xboIc=
github.com/qdm12/updated v0.0.0-20210102005021-dd457d77f94a/go.mod h1:bbJGxEYCnsA8WU4vBcXYU6mOoHyzdP458FIKP4mfLJM=
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/yl2chen/cidranger v1.0.2/go.mod h1:9U1yz7WPYDwf0vpNWFaeRh0bjwz5RVgRy/9UEQfHl0g=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98=
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

23
internal/alpine/alpine.go Normal file
View File

@@ -0,0 +1,23 @@
// Package alpine defines a configurator to interact with the Alpine operating system.
package alpine
import (
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/os/user"
)
type Configurator interface {
CreateUser(username string, uid int) (createdUsername string, err error)
}
type configurator struct {
openFile os.OpenFileFunc
osUser user.OSUser
}
func NewConfigurator(openFile os.OpenFileFunc, osUser user.OSUser) Configurator {
return &configurator{
openFile: openFile,
osUser: osUser,
}
}

41
internal/alpine/users.go Normal file
View File

@@ -0,0 +1,41 @@
package alpine
import (
"fmt"
"os"
"os/user"
)
// CreateUser creates a user in Alpine with the given UID.
func (c *configurator) CreateUser(username string, uid int) (createdUsername string, err error) {
UIDStr := fmt.Sprintf("%d", uid)
u, err := c.osUser.LookupID(UIDStr)
_, unknownUID := err.(user.UnknownUserIdError)
if err != nil && !unknownUID {
return "", fmt.Errorf("cannot create user: %w", err)
} else if u != nil {
if u.Username == username {
return "", nil
}
return u.Username, nil
}
u, err = c.osUser.Lookup(username)
_, unknownUsername := err.(user.UnknownUserError)
if err != nil && !unknownUsername {
return "", fmt.Errorf("cannot create user: %w", err)
} else if u != nil {
return "", fmt.Errorf("cannot create user: user with name %s already exists for ID %s instead of %d",
username, u.Uid, uid)
}
file, err := c.openFile("/etc/passwd", os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
return "", fmt.Errorf("cannot create user: %w", err)
}
s := fmt.Sprintf("%s:x:%d:::/dev/null:/sbin/nologin\n", username, uid)
_, err = file.WriteString(s)
if err != nil {
_ = file.Close()
return "", err
}
return username, file.Close()
}

7
internal/cli/ci.go Normal file
View File

@@ -0,0 +1,7 @@
package cli
import "context"
func (c *cli) CI(context context.Context) error {
return nil
}

21
internal/cli/cli.go Normal file
View File

@@ -0,0 +1,21 @@
// Package cli defines an interface CLI to run command line operations.
package cli
import (
"context"
"github.com/qdm12/golibs/os"
)
type CLI interface {
ClientKey(args []string, openFile os.OpenFileFunc) error
HealthCheck(ctx context.Context) error
OpenvpnConfig(os os.OS) error
Update(ctx context.Context, args []string, os os.OS) error
}
type cli struct{}
func New() CLI {
return &cli{}
}

41
internal/cli/clientkey.go Normal file
View File

@@ -0,0 +1,41 @@
package cli
import (
"flag"
"fmt"
"io/ioutil"
"strings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/os"
)
func (c *cli) ClientKey(args []string, openFile os.OpenFileFunc) error {
flagSet := flag.NewFlagSet("clientkey", flag.ExitOnError)
filepath := flagSet.String("path", constants.ClientKey, "file path to the client.key file")
if err := flagSet.Parse(args); err != nil {
return err
}
file, err := openFile(*filepath, os.O_RDONLY, 0)
if err != nil {
return err
}
data, err := ioutil.ReadAll(file)
if err != nil {
_ = file.Close()
return err
}
if err := file.Close(); err != nil {
return err
}
if err != nil {
return err
}
s := string(data)
s = strings.ReplaceAll(s, "\n", "")
s = strings.ReplaceAll(s, "\r", "")
s = strings.TrimPrefix(s, "-----BEGIN PRIVATE KEY-----")
s = strings.TrimSuffix(s, "-----END PRIVATE KEY-----")
fmt.Println(s)
return nil
}

View File

@@ -0,0 +1,20 @@
package cli
import (
"context"
"net/http"
"time"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/healthcheck"
)
func (c *cli) HealthCheck(ctx context.Context) error {
const timeout = 10 * time.Second
httpClient := &http.Client{Timeout: timeout}
healthchecker := healthcheck.NewChecker(httpClient)
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
const url = "http://" + constants.HealthcheckAddress
return healthchecker.Check(ctx, url)
}

View File

@@ -0,0 +1,38 @@
package cli
import (
"fmt"
"strings"
"time"
"github.com/qdm12/gluetun/internal/configuration"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/provider"
"github.com/qdm12/gluetun/internal/storage"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/params"
)
func (c *cli) OpenvpnConfig(os os.OS) error {
logger := logging.New(logging.StdLog)
var allSettings configuration.Settings
err := allSettings.Read(params.NewEnv(), os, logger)
if err != nil {
return err
}
allServers, err := storage.New(logger, os, constants.ServersData).
SyncServers(constants.GetAllServers())
if err != nil {
return err
}
providerConf := provider.New(allSettings.OpenVPN.Provider.Name, allServers, time.Now)
connection, err := providerConf.GetOpenVPNConnection(allSettings.OpenVPN.Provider.ServerSelection)
if err != nil {
return err
}
lines := providerConf.BuildConf(connection, "nonroortuser", allSettings.OpenVPN)
fmt.Println(strings.Join(lines, "\n"))
return nil
}

66
internal/cli/update.go Normal file
View File

@@ -0,0 +1,66 @@
package cli
import (
"context"
"flag"
"fmt"
"net/http"
"time"
"github.com/qdm12/gluetun/internal/configuration"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/storage"
"github.com/qdm12/gluetun/internal/updater"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/os"
)
func (c *cli) Update(ctx context.Context, args []string, os os.OS) error {
options := configuration.Updater{CLI: true}
var flushToFile bool
flagSet := flag.NewFlagSet("update", flag.ExitOnError)
flagSet.BoolVar(&flushToFile, "file", false, "Write results to /gluetun/servers.json (for end users)")
flagSet.BoolVar(&options.Stdout, "stdout", false, "Write results to console to modify the program (for maintainers)")
flagSet.StringVar(&options.DNSAddress, "dns", "8.8.8.8", "DNS resolver address to use")
flagSet.BoolVar(&options.Cyberghost, "cyberghost", false, "Update Cyberghost servers")
flagSet.BoolVar(&options.Fastestvpn, "fastestvpn", false, "Update FastestVPN servers")
flagSet.BoolVar(&options.HideMyAss, "hidemyass", false, "Update HideMyAss servers")
flagSet.BoolVar(&options.Mullvad, "mullvad", false, "Update Mullvad servers")
flagSet.BoolVar(&options.Nordvpn, "nordvpn", false, "Update Nordvpn servers")
flagSet.BoolVar(&options.PIA, "pia", false, "Update Private Internet Access post-summer 2020 servers")
flagSet.BoolVar(&options.Privado, "privado", false, "Update Privado servers")
flagSet.BoolVar(&options.Privatevpn, "privatevpn", false, "Update Private VPN servers")
flagSet.BoolVar(&options.Protonvpn, "protonvpn", false, "Update Protonvpn servers")
flagSet.BoolVar(&options.Purevpn, "purevpn", false, "Update Purevpn servers")
flagSet.BoolVar(&options.Surfshark, "surfshark", false, "Update Surfshark servers")
flagSet.BoolVar(&options.Torguard, "torguard", false, "Update Torguard servers")
flagSet.BoolVar(&options.Vyprvpn, "vyprvpn", false, "Update Vyprvpn servers")
flagSet.BoolVar(&options.Windscribe, "windscribe", false, "Update Windscribe servers")
if err := flagSet.Parse(args); err != nil {
return err
}
logger := logging.New(logging.StdLog)
if !flushToFile && !options.Stdout {
return fmt.Errorf("at least one of -file or -stdout must be specified")
}
const clientTimeout = 10 * time.Second
httpClient := &http.Client{Timeout: clientTimeout}
storage := storage.New(logger, os, constants.ServersData)
currentServers, err := storage.SyncServers(constants.GetAllServers())
if err != nil {
return fmt.Errorf("cannot update servers: %w", err)
}
updater := updater.New(options, httpClient, currentServers, logger)
allServers, err := updater.UpdateServers(ctx)
if err != nil {
return err
}
if flushToFile {
if err := storage.FlushToFile(allServers); err != nil {
return fmt.Errorf("cannot update servers: %w", err)
}
}
return nil
}

View File

@@ -0,0 +1,3 @@
// Package configuration reads initial settings from environment variables
// and secret files.
package configuration

View File

@@ -0,0 +1,6 @@
package configuration
const (
lastIndent = "|--"
indent = " "
)

View File

@@ -0,0 +1,107 @@
package configuration
import (
"encoding/pem"
"fmt"
"strings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
func (settings *Provider) cyberghostLines() (lines []string) {
lines = append(lines, lastIndent+"Server group: "+settings.ServerSelection.Group)
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if settings.ExtraConfigOptions.ClientKey != "" {
lines = append(lines, lastIndent+"Client key is set")
}
if settings.ExtraConfigOptions.ClientCertificate != "" {
lines = append(lines, lastIndent+"Client certificate is set")
}
return lines
}
func (settings *Provider) readCyberghost(r reader) (err error) {
settings.Name = constants.Cyberghost
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ExtraConfigOptions.ClientKey, err = readCyberghostClientKey(r)
if err != nil {
return err
}
settings.ExtraConfigOptions.ClientCertificate, err = readCyberghostClientCertificate(r)
if err != nil {
return err
}
settings.ServerSelection.Group, err = r.env.Inside("CYBERGHOST_GROUP",
constants.CyberghostGroupChoices(), params.Default("Premium UDP Europe"))
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.CyberghostRegionChoices())
if err != nil {
return err
}
return nil
}
func readCyberghostClientKey(r reader) (clientKey string, err error) {
b, err := r.getFromFileOrSecretFile("OPENVPN_CLIENTKEY", constants.ClientKey)
if err != nil {
return "", err
}
return extractClientKey(b)
}
func extractClientKey(b []byte) (key string, err error) {
pemBlock, _ := pem.Decode(b)
if pemBlock == nil {
return "", fmt.Errorf("cannot decode PEM block from client key")
}
parsedBytes := pem.EncodeToMemory(pemBlock)
s := string(parsedBytes)
s = strings.ReplaceAll(s, "\n", "")
s = strings.TrimPrefix(s, "-----BEGIN PRIVATE KEY-----")
s = strings.TrimSuffix(s, "-----END PRIVATE KEY-----")
return s, nil
}
func readCyberghostClientCertificate(r reader) (clientCertificate string, err error) {
b, err := r.getFromFileOrSecretFile("OPENVPN_CLIENTCRT", constants.ClientCertificate)
if err != nil {
return "", err
}
return extractClientCertificate(b)
}
func extractClientCertificate(b []byte) (certificate string, err error) {
pemBlock, _ := pem.Decode(b)
if pemBlock == nil {
return "", fmt.Errorf("cannot decode PEM block from client certificate")
}
parsedBytes := pem.EncodeToMemory(pemBlock)
s := string(parsedBytes)
s = strings.ReplaceAll(s, "\n", "")
s = strings.TrimPrefix(s, "-----BEGIN CERTIFICATE-----")
s = strings.TrimSuffix(s, "-----END CERTIFICATE-----")
return s, nil
}

View File

@@ -0,0 +1,175 @@
package configuration
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_extractClientKey(t *testing.T) {
t.Parallel()
const validPEM = `
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCrQDrezCptkWxX
ywm3KdXtvti+rPF3vfzOmXRKiK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y3+uLFIXqpRLQX995R9rm/+P2ZDzgVF5///E2dXOTElACax3117TzIE6F6qqeASGi3ppLNmfAwZ95t/inTVsRARE/MhO6w4YJLQ0U7N6XoDM/BVfVGUr8OS/lpXjkW0oBjvwaehnylUPxuEdmOg8ufdBkX0T8XW3z4jkn2cAGouGl/vKqWLD2AgF/j16Ejn/hyrWM3TnAoIBAA6lSssrwIDJ11KljwSXyQJirtJtymv56cIACwD7xhDRF7pOoRa6cTRx383CWCszm6Mh8pw9D+Zn8kAZ9UlwkhtyDiLFWH8ZLaIds5Kub4siJkihGI2MZTYgCS8GKVpXo4ktQnnynWcOQU85okzRnULw/jS5wlTDkjc7XdYbYiV9H65KplfPOeJRbLL7zsensBhhwCiFaP8zct/QxDVR7yb/dYWESepJIktcVnuiFuvIdLTbDVj4YqT6UkuaEPlLszVaO+FYAlwOmRQGs4Bn2NVJR/4wa/B3HxSs4Tc96fN02bLq4CbCKoPajoZ46lsIuMZO9fBi3eHNObyNiopuAnECggEBAJiJ0tK/PGh+Q9uv57Z4QcmbawoxMQW1qK/rLYwacYsSpzo8VhbZf+Jh8biMg9AIQsLWnqmB3gmndePArGXkSxnilRozNLaeclTZy7rh00BctTEfgee4KxdiJKkJlVK0CE8I6txVRqkoOMyxsk1kRZ4l2yW2nxzyWlJKwvD75x2PQ6xWvpLAggynq00I3MzNIgR123jytN1NyC7l+mnGoC23ToXM7B3/PQjGYTq3jawKomrX1cmwzKBT+pzjtJSWvMeUEZQS1PpOhxpPBRHagdKXt+ug2DqDtU6rfpDGtTBh5QNkg5SA7lxZzZjrL52saevO25cigVl+hxcnY8DTpbk=" //nolint:lll
testCases := map[string]struct {
b []byte
key string
err error
}{
"no input": {
err: fmt.Errorf("cannot decode PEM block from client key"),
},
"bad input": {
b: []byte{1, 2, 3},
err: fmt.Errorf("cannot decode PEM block from client key"),
},
"valid key": {
b: []byte(validPEM),
key: validKeyString,
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
key, err := extractClientKey(testCase.b)
if testCase.err != nil {
require.Error(t, err)
assert.Equal(t, testCase.err.Error(), err.Error())
} else {
assert.NoError(t, err)
}
assert.Equal(t, testCase.key, key)
})
}
}
func Test_extractClientCertificate(t *testing.T) {
t.Parallel()
const validPEM = `
-----BEGIN CERTIFICATE-----
MIIGrDCCBJSgAwIBAgIEAdTnfTANBgkqhkiG9w0BAQsFADB7MQswCQYDVQQGEwJS
TzESMBAGA1UEBxMJQnVjaGFyZXN0MRgwFgYDVQQKEw9DeWJlckdob3N0IFMuQS4x
GzAZBgNVBAMTEkN5YmVyR2hvc3QgUm9vdCBDQTEhMB8GCSqGSIb3DQEJARYSaW5m
b0BjeWJlcmdob3N0LnJvMB4XDTIwMDcwNDE1MjkzNloXDTMwMDcwMjE1MjkzNlow
fTELMAkGA1UEBhMCUk8xEjAQBgNVBAcMCUJ1Y2hhcmVzdDEYMBYGA1UECgwPQ3li
ZXJHaG9zdCBTLkEuMR0wGwYDVQQDDBRjLmoua2xhdmVyQGdtYWlsLmNvbTEhMB8G
CSqGSIb3DQEJARYSaW5mb0BjeWJlcmdob3N0LnJvMIICIjANBgkqhkiG9w0BAQEF
AAOCAg8AMIICCgKCAgEAobp2NlGUHMNBe08YEOnVG3QJjF3ZaXbRhE/II9rmtgJT
NZtDohGChvFlNRsExKzVrKxHCeuJkVffwzQ6fYk4/M1RdYLJUh0UVw3e4WdApw8E
7TJZxDYm4SHQNXUvt1Rt5TjslcXxIpDZgrMSc/kHROYEL9tdgdzPZErUJehXyJPh
EzIrzmAJh501x7WwKPz9ctSVlItyavqEWFF2vyUa6X9DYmD9mQTz5c+VXNO5DkXm
PFBIaEVDnvFtcjGJ56yEvFnWVukL+OUX7ezowrIOFOcp9udjgpeiHq+XvsQ6ER0D
Jt25MiEId3NjkxtZ8BitDftTcLN/kt81hWKT7adMVc3kpIZ80cxrwRCttMd7sHAz
KI9u7pMxv10eUOsIEY87ewBe3l6KvEnjA+9uIjim6gLLebDIa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rXuGF5NuIOX7eFtCMQSgQq6lRRqTQjekm0Dxigx4JA92Jo2qZRwCJ0T3IXBJGL831HCFJbDWv8PV3lsfFb/i2+vr54uywFQVWWp18dYi97gipfuQ4zRg2Ldx5aXSmnhhKpg5ioZvtk043QofF12YORhobElqavRbvvhZvlCouvcuoq9QKi7IPe5SJZkZ1X7ezMesCwBzwFpt6vRUAcslsNFbcYS1iSENlY/PTcDqBhbKuc9yAhq+/aUgaY/8VF5RWVzSRZufbf3BPwOkE4K0UybaobO/YX0JOkCacAD+4tdR6YSXNIMMRAOCBQvxbxFXaHzhwhzBAjdsC56FrJKwXvQrRLU3tF4P0zFMeNTay8uTtUXugDK7EnklLESuYdpUJ8bUMlAUhJBi6UFI9/icMudxXvLRvhnBW9EtKib5JnVFUovcEUt+3EJbyst05nkL4YPjQS4TC9DHdo5SyRAy1TpiOCYTbretAFZRhh6ycUN5hBeN8GMQxiMreMtDV4PEIQ=" //nolint:lll
testCases := map[string]struct {
b []byte
certificate string
err error
}{
"no input": {
err: fmt.Errorf("cannot decode PEM block from client certificate"),
},
"bad input": {
b: []byte{1, 2, 3},
err: fmt.Errorf("cannot decode PEM block from client certificate"),
},
"valid key": {
b: []byte(validPEM),
certificate: validCertificateString,
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
certificate, err := extractClientCertificate(testCase.b)
if testCase.err != nil {
require.Error(t, err)
assert.Equal(t, testCase.err.Error(), err.Error())
} else {
assert.NoError(t, err)
}
assert.Equal(t, testCase.certificate, certificate)
})
}
}

View File

@@ -0,0 +1,154 @@
package configuration
import (
"errors"
"fmt"
"net"
"strings"
"time"
unboundmodels "github.com/qdm12/dns/pkg/models"
unbound "github.com/qdm12/dns/pkg/unbound"
"github.com/qdm12/golibs/params"
)
// DNS contains settings to configure Unbound for DNS over TLS operation.
type DNS struct { //nolint:maligned
Enabled bool
PlaintextAddress net.IP
KeepNameserver bool
BlockMalicious bool
BlockAds bool
BlockSurveillance bool
UpdatePeriod time.Duration
Unbound unboundmodels.Settings
}
func (settings *DNS) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *DNS) lines() (lines []string) {
lines = append(lines, lastIndent+"DNS:")
if settings.PlaintextAddress != nil {
lines = append(lines, indent+lastIndent+"Plaintext address: "+settings.PlaintextAddress.String())
}
if settings.KeepNameserver {
lines = append(lines, indent+lastIndent+"Keep nameserver (disabled blocking): yes")
}
if !settings.Enabled {
return lines
}
lines = append(lines, indent+lastIndent+"DNS over TLS:")
lines = append(lines, indent+indent+lastIndent+"Unbound:")
for _, line := range settings.Unbound.Lines() {
lines = append(lines, indent+indent+indent+line)
}
if settings.BlockMalicious {
lines = append(lines, indent+indent+lastIndent+"Block malicious: enabled")
}
if settings.BlockAds {
lines = append(lines, indent+indent+lastIndent+"Block ads: enabled")
}
if settings.BlockSurveillance {
lines = append(lines, indent+indent+lastIndent+"Block surveillance: enabled")
}
if settings.UpdatePeriod > 0 {
lines = append(lines, indent+indent+lastIndent+"Update: every "+settings.UpdatePeriod.String())
}
return lines
}
var (
ErrUnboundSettings = errors.New("failed getting Unbound settings")
ErrDNSProviderNoData = errors.New("DNS provider has no associated data")
ErrDNSProviderNoTLS = errors.New("DNS provider does not support DNS over TLS")
ErrDNSNoIPv6Support = errors.New("no DNS provider supports IPv6")
)
func (settings *DNS) read(r reader) (err error) {
settings.Enabled, err = r.env.OnOff("DOT", params.Default("on"))
if err != nil {
return err
}
// Plain DNS settings
if err := settings.readDNSPlaintext(r.env); err != nil {
return err
}
settings.KeepNameserver, err = r.env.OnOff("DNS_KEEP_NAMESERVER", params.Default("off"))
if err != nil {
return err
}
// DNS over TLS external settings
settings.BlockMalicious, err = r.env.OnOff("BLOCK_MALICIOUS", params.Default("on"))
if err != nil {
return err
}
settings.BlockSurveillance, err = r.env.OnOff("BLOCK_SURVEILLANCE", params.Default("on"),
params.RetroKeys([]string{"BLOCK_NSA"}, r.onRetroActive))
if err != nil {
return err
}
settings.BlockAds, err = r.env.OnOff("BLOCK_ADS", params.Default("off"))
if err != nil {
return err
}
settings.UpdatePeriod, err = r.env.Duration("DNS_UPDATE_PERIOD", params.Default("24h"))
if err != nil {
return err
}
if err := settings.readUnbound(r); err != nil {
return fmt.Errorf("%w: %s", ErrUnboundSettings, err)
}
// Consistency check
IPv6Support := false
for _, provider := range settings.Unbound.Providers {
providerData, ok := unbound.GetProviderData(provider)
switch {
case !ok:
return fmt.Errorf("%w: %s", ErrDNSProviderNoData, provider)
case !providerData.SupportsTLS:
return fmt.Errorf("%w: %s", ErrDNSProviderNoTLS, provider)
case providerData.SupportsIPv6:
IPv6Support = true
}
}
if settings.Unbound.IPv6 && !IPv6Support {
return ErrDNSNoIPv6Support
}
return nil
}
var (
ErrDNSAddressNotAnIP = errors.New("DNS plaintext address is not an IP address")
)
func (settings *DNS) readDNSPlaintext(env params.Env) error {
s, err := env.Get("DNS_PLAINTEXT_ADDRESS", params.Default("1.1.1.1"))
if err != nil {
return err
}
settings.PlaintextAddress = net.ParseIP(s)
if settings.PlaintextAddress == nil {
return fmt.Errorf("%w: %s", ErrDNSAddressNotAnIP, s)
}
return nil
}

View File

@@ -0,0 +1,73 @@
package configuration
import (
"net"
"testing"
"time"
"github.com/qdm12/dns/pkg/models"
"github.com/stretchr/testify/assert"
)
func Test_DNS_Lines(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
settings DNS
lines []string
}{
"disabled DOT": {
settings: DNS{
PlaintextAddress: net.IP{1, 1, 1, 1},
},
lines: []string{
"|--DNS:",
" |--Plaintext address: 1.1.1.1",
},
},
"enabled DOT": {
settings: DNS{
Enabled: true,
KeepNameserver: true,
Unbound: models.Settings{
Providers: []string{"cloudflare"},
},
BlockMalicious: true,
BlockAds: true,
BlockSurveillance: true,
UpdatePeriod: time.Hour,
},
lines: []string{
"|--DNS:",
" |--Keep nameserver (disabled blocking): yes",
" |--DNS over TLS:",
" |--Unbound:",
" |--DNS over TLS providers:",
" |--cloudflare",
" |--Listening port: 0",
" |--Access control:",
" |--Allowed:",
" |--Caching: disabled",
" |--IPv4 resolution: disabled",
" |--IPv6 resolution: disabled",
" |--Verbosity level: 0/5",
" |--Verbosity details level: 0/4",
" |--Validation log level: 0/2",
" |--Blocked hostnames:",
" |--Blocked IP addresses:",
" |--Allowed hostnames:",
" |--Block malicious: enabled",
" |--Block ads: enabled",
" |--Block surveillance: enabled",
" |--Update: every 1h0m0s",
},
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
lines := testCase.settings.lines()
assert.Equal(t, testCase.lines, lines)
})
}
}

View File

@@ -0,0 +1,43 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) fastestvpnLines() (lines []string) {
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
return lines
}
func (settings *Provider) readFastestvpn(r reader) (err error) {
settings.Name = constants.Fastestvpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.FastestvpnHostnameChoices())
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.FastestvpnCountriesChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,93 @@
package configuration
import (
"net"
"strings"
"github.com/qdm12/golibs/params"
)
// Firewall contains settings to customize the firewall operation.
type Firewall struct {
VPNInputPorts []uint16
InputPorts []uint16
OutboundSubnets []net.IPNet
Enabled bool
Debug bool
}
func (settings *Firewall) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *Firewall) lines() (lines []string) {
if !settings.Enabled {
lines = append(lines, lastIndent+"Firewall: disabled ⚠️")
return lines
}
lines = append(lines, lastIndent+"Firewall:")
if settings.Debug {
lines = append(lines, indent+lastIndent+"Debug: on")
}
if len(settings.VPNInputPorts) > 0 {
lines = append(lines, indent+lastIndent+"VPN input ports: "+
strings.Join(uint16sToStrings(settings.VPNInputPorts), ", "))
}
if len(settings.InputPorts) > 0 {
lines = append(lines, indent+lastIndent+"Input ports: "+
strings.Join(uint16sToStrings(settings.InputPorts), ", "))
}
if len(settings.OutboundSubnets) > 0 {
lines = append(lines, indent+lastIndent+"Outbound subnets: "+
strings.Join(ipNetsToStrings(settings.OutboundSubnets), ", "))
}
return lines
}
func (settings *Firewall) read(r reader) (err error) {
settings.Enabled, err = r.env.OnOff("FIREWALL", params.Default("on"))
if err != nil {
return err
}
settings.Debug, err = r.env.OnOff("FIREWALL_DEBUG", params.Default("off"))
if err != nil {
return err
}
if err := settings.readVPNInputPorts(r.env); err != nil {
return err
}
if err := settings.readInputPorts(r.env); err != nil {
return err
}
if err := settings.readOutboundSubnets(r); err != nil {
return err
}
return nil
}
func (settings *Firewall) readVPNInputPorts(env params.Env) (err error) {
settings.VPNInputPorts, err = readCSVPorts(env, "FIREWALL_VPN_INPUT_PORTS")
return err
}
func (settings *Firewall) readInputPorts(env params.Env) (err error) {
settings.InputPorts, err = readCSVPorts(env, "FIREWALL_INPUT_PORTS")
return err
}
func (settings *Firewall) readOutboundSubnets(r reader) (err error) {
retroOption := params.RetroKeys([]string{"EXTRA_SUBNETS"}, r.onRetroActive)
settings.OutboundSubnets, err = readCSVIPNets(r.env, "FIREWALL_OUTBOUND_SUBNETS", retroOption)
return err
}

View File

@@ -0,0 +1,61 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) hideMyAssLines() (lines []string) {
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
func (settings *Provider) readHideMyAss(r reader) (err error) {
settings.Name = constants.HideMyAss
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.HideMyAssCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.HideMyAssCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.HideMyAssCityChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.TorguardHostnamesChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,105 @@
package configuration
import (
"strconv"
"strings"
"github.com/qdm12/golibs/params"
)
// HTTPProxy contains settings to configure the HTTP proxy.
type HTTPProxy struct {
User string
Password string
Port uint16
Enabled bool
Stealth bool
Log bool
}
func (settings *HTTPProxy) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *HTTPProxy) lines() (lines []string) {
if !settings.Enabled {
return nil
}
lines = append(lines, lastIndent+"HTTP proxy:")
lines = append(lines, indent+lastIndent+"Port: "+strconv.Itoa(int(settings.Port)))
if settings.User != "" {
lines = append(lines, indent+lastIndent+"Authentication: enabled")
}
if settings.Log {
lines = append(lines, indent+lastIndent+"Log: enabled")
}
if settings.Stealth {
lines = append(lines, indent+lastIndent+"Stealth: enabled")
}
return lines
}
func (settings *HTTPProxy) read(r reader) (err error) {
settings.Enabled, err = r.env.OnOff("HTTPPROXY", params.Default("off"),
params.RetroKeys([]string{"TINYPROXY", "PROXY"}, r.onRetroActive))
if err != nil {
return err
}
settings.User, err = r.getFromEnvOrSecretFile("HTTPPROXY_USER", false, // compulsory
[]string{"TINYPROXY_USER", "PROXY_USER"})
if err != nil {
return err
}
settings.Password, err = r.getFromEnvOrSecretFile("HTTPPROXY_PASSWORD", false,
[]string{"TINYPROXY_PASSWORD", "PROXY_PASSWORD"})
if err != nil {
return err
}
settings.Stealth, err = r.env.OnOff("HTTPPROXY_STEALTH", params.Default("off"))
if err != nil {
return err
}
if err := settings.readLog(r); err != nil {
return err
}
var warning string
settings.Port, warning, err = r.env.ListeningPort("HTTPPROXY_PORT", params.Default("8888"),
params.RetroKeys([]string{"TINYPROXY_PORT", "PROXY_PORT"}, r.onRetroActive))
if len(warning) > 0 {
r.logger.Warn(warning)
}
if err != nil {
return err
}
return nil
}
func (settings *HTTPProxy) readLog(r reader) error {
s, err := r.env.Get("HTTPPROXY_LOG",
params.RetroKeys([]string{"PROXY_LOG_LEVEL", "TINYPROXY_LOG"}, r.onRetroActive))
if err != nil {
return err
}
switch strings.ToLower(s) {
case "on":
settings.Log = true
// Retro compatibility
case "info", "connect", "notice":
settings.Log = true
}
return nil
}

View File

@@ -0,0 +1,22 @@
package configuration
import (
"net"
"strconv"
)
func uint16sToStrings(uint16s []uint16) (strings []string) {
strings = make([]string, len(uint16s))
for i := range uint16s {
strings[i] = strconv.Itoa(int(uint16s[i]))
}
return strings
}
func ipNetsToStrings(ipNets []net.IPNet) (strings []string) {
strings = make([]string, len(ipNets))
for i := range ipNets {
strings[i] = ipNets[i].String()
}
return strings
}

View File

@@ -0,0 +1,79 @@
package configuration
import (
"strconv"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
func (settings *Provider) mullvadLines() (lines []string) {
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.ISPs) > 0 {
lines = append(lines, lastIndent+"ISPs: "+commaJoin(settings.ServerSelection.ISPs))
}
if settings.ServerSelection.CustomPort > 0 {
lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort)))
}
if settings.ExtraConfigOptions.OpenVPNIPv6 {
lines = append(lines, lastIndent+"IPv6: enabled")
}
return lines
}
func (settings *Provider) readMullvad(r reader) (err error) {
settings.Name = constants.Mullvad
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.MullvadCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.MullvadCityChoices())
if err != nil {
return err
}
settings.ServerSelection.ISPs, err = r.env.CSVInside("ISP", constants.MullvadISPChoices())
if err != nil {
return err
}
settings.ServerSelection.CustomPort, err = readCustomPort(r.env, settings.ServerSelection.Protocol,
[]uint16{80, 443, 1401}, []uint16{53, 1194, 1195, 1196, 1197, 1300, 1301, 1302, 1303, 1400})
if err != nil {
return err
}
settings.ServerSelection.Owned, err = r.env.YesNo("OWNED", params.Default("no"))
if err != nil {
return err
}
settings.ExtraConfigOptions.OpenVPNIPv6, err = r.env.OnOff("OPENVPN_IPV6", params.Default("off"))
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,72 @@
package configuration
import (
"fmt"
"strconv"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
func (settings *Provider) nordvpnLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if numbersUint16 := settings.ServerSelection.Numbers; len(numbersUint16) > 0 {
numbersString := make([]string, len(numbersUint16))
for i, numberUint16 := range numbersUint16 {
numbersString[i] = strconv.Itoa(int(numberUint16))
}
lines = append(lines, lastIndent+"Numbers: "+commaJoin(numbersString))
}
return lines
}
func (settings *Provider) readNordvpn(r reader) (err error) {
settings.Name = constants.Nordvpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.NordvpnRegionChoices())
if err != nil {
return err
}
settings.ServerSelection.Numbers, err = readNordVPNServerNumbers(r.env)
if err != nil {
return err
}
return nil
}
func readNordVPNServerNumbers(env params.Env) (numbers []uint16, err error) {
possibilities := make([]string, 65537)
for i := range possibilities {
possibilities[i] = fmt.Sprintf("%d", i)
}
possibilities[65536] = ""
values, err := env.CSVInside("SERVER_NUMBER", possibilities)
if err != nil {
return nil, err
}
numbers = make([]uint16, len(values))
for i := range values {
n, err := strconv.Atoi(values[i])
if err != nil {
return nil, err
}
numbers[i] = uint16(n)
}
return numbers, nil
}

View File

@@ -0,0 +1,161 @@
package configuration
import (
"errors"
"fmt"
"strconv"
"strings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
// OpenVPN contains settings to configure the OpenVPN client.
type OpenVPN struct {
User string `json:"user"`
Password string `json:"password"`
Verbosity int `json:"verbosity"`
MSSFix uint16 `json:"mssfix"`
Root bool `json:"run_as_root"`
Cipher string `json:"cipher"`
Auth string `json:"auth"`
Provider Provider `json:"provider"`
Config string `json:"custom_config"`
}
func (settings *OpenVPN) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *OpenVPN) lines() (lines []string) {
lines = append(lines, lastIndent+"OpenVPN:")
lines = append(lines, indent+lastIndent+"Verbosity level: "+strconv.Itoa(settings.Verbosity))
if settings.Root {
lines = append(lines, indent+lastIndent+"Run as root: enabled")
}
if len(settings.Cipher) > 0 {
lines = append(lines, indent+lastIndent+"Custom cipher: "+settings.Cipher)
}
if len(settings.Auth) > 0 {
lines = append(lines, indent+lastIndent+"Custom auth algorithm: "+settings.Auth)
}
if len(settings.Config) > 0 {
lines = append(lines, indent+lastIndent+"Custom configuration: "+settings.Config)
}
lines = append(lines, indent+lastIndent+"Provider:")
for _, line := range settings.Provider.lines() {
lines = append(lines, indent+indent+line)
}
return lines
}
var (
ErrInvalidVPNProvider = errors.New("invalid VPN provider")
)
func (settings *OpenVPN) read(r reader) (err error) {
vpnsp, err := r.env.Inside("VPNSP", []string{
"cyberghost", "fastestvpn", "hidemyass", "mullvad", "nordvpn",
"privado", "pia", "private internet access", "privatevpn", "protonvpn",
"purevpn", "surfshark", "torguard", "vyprvpn", "windscribe"},
params.Default("private internet access"))
if err != nil {
return err
}
if vpnsp == "pia" { // retro compatibility
vpnsp = "private internet access"
}
settings.Provider.Name = vpnsp
settings.Config, err = r.env.Get("OPENVPN_CUSTOM_CONFIG", params.CaseSensitiveValue())
if err != nil {
return err
}
credentialsRequired := len(settings.Config) == 0
settings.User, err = r.getFromEnvOrSecretFile("OPENVPN_USER", credentialsRequired, []string{"USER"})
if err != nil {
return err
}
// Remove spaces in user ID to simplify user's life, thanks @JeordyR
settings.User = strings.ReplaceAll(settings.User, " ", "")
if settings.Provider.Name == constants.Mullvad {
settings.Password = "m"
} else {
settings.Password, err = r.getFromEnvOrSecretFile("OPENVPN_PASSWORD", credentialsRequired, []string{"PASSWORD"})
if err != nil {
return err
}
}
settings.Verbosity, err = r.env.IntRange("OPENVPN_VERBOSITY", 0, 6, params.Default("1"))
if err != nil {
return err
}
settings.Root, err = r.env.YesNo("OPENVPN_ROOT", params.Default("yes"))
if err != nil {
return err
}
settings.Cipher, err = r.env.Get("OPENVPN_CIPHER")
if err != nil {
return err
}
settings.Auth, err = r.env.Get("OPENVPN_AUTH")
if err != nil {
return err
}
mssFix, err := r.env.IntRange("OPENVPN_MSSFIX", 0, 10000, params.Default("0"))
if err != nil {
return err
}
settings.MSSFix = uint16(mssFix)
var readProvider func(r reader) error
switch settings.Provider.Name {
case constants.Cyberghost:
readProvider = settings.Provider.readCyberghost
case constants.Fastestvpn:
readProvider = settings.Provider.readFastestvpn
case constants.HideMyAss:
readProvider = settings.Provider.readHideMyAss
case constants.Mullvad:
readProvider = settings.Provider.readMullvad
case constants.Nordvpn:
readProvider = settings.Provider.readNordvpn
case constants.Privado:
readProvider = settings.Provider.readPrivado
case constants.PrivateInternetAccess:
readProvider = settings.Provider.readPrivateInternetAccess
case constants.Privatevpn:
readProvider = settings.Provider.readPrivatevpn
case constants.Protonvpn:
readProvider = settings.Provider.readProtonvpn
case constants.Purevpn:
readProvider = settings.Provider.readPurevpn
case constants.Surfshark:
readProvider = settings.Provider.readSurfshark
case constants.Torguard:
readProvider = settings.Provider.readTorguard
case constants.Vyprvpn:
readProvider = settings.Provider.readVyprvpn
case constants.Windscribe:
readProvider = settings.Provider.readWindscribe
default:
return fmt.Errorf("%w: %s", ErrInvalidVPNProvider, settings.Provider.Name)
}
return readProvider(r)
}

View File

@@ -0,0 +1,60 @@
package configuration
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_OpenVPN_JSON(t *testing.T) {
t.Parallel()
in := OpenVPN{
Root: true,
Provider: Provider{
Name: "name",
},
}
data, err := json.MarshalIndent(in, "", " ")
require.NoError(t, err)
assert.Equal(t, `{
"user": "",
"password": "",
"verbosity": 0,
"mssfix": 0,
"run_as_root": true,
"cipher": "",
"auth": "",
"provider": {
"name": "name",
"server_selection": {
"network_protocol": "",
"regions": null,
"group": "",
"countries": null,
"cities": null,
"hostnames": null,
"names": null,
"isps": null,
"owned": false,
"custom_port": 0,
"numbers": null,
"encryption_preset": ""
},
"extra_config": {
"encryption_preset": "",
"openvpn_ipv6": false
},
"port_forwarding": {
"enabled": false,
"filepath": ""
}
},
"custom_config": ""
}`, string(data))
var out OpenVPN
err = json.Unmarshal(data, &out)
require.NoError(t, err)
assert.Equal(t, in, out)
}

View File

@@ -0,0 +1,34 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) privadoLines() (lines []string) {
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
func (settings *Provider) readPrivado(r reader) (err error) {
settings.Name = constants.Privado
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.PrivadoHostnameChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,77 @@
package configuration
import (
"strconv"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
func (settings *Provider) privateinternetaccessLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
lines = append(lines, lastIndent+"Encryption preset: "+settings.ServerSelection.EncryptionPreset)
lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort)))
if settings.PortForwarding.Enabled {
lines = append(lines, lastIndent+"Port forwarding:")
for _, line := range settings.PortForwarding.lines() {
lines = append(lines, indent+line)
}
}
return lines
}
func (settings *Provider) readPrivateInternetAccess(r reader) (err error) {
settings.Name = constants.PrivateInternetAccess
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
encryptionPreset, err := r.env.Inside("PIA_ENCRYPTION",
[]string{constants.PIAEncryptionPresetNormal, constants.PIAEncryptionPresetStrong},
params.RetroKeys([]string{"ENCRYPTION"}, r.onRetroActive),
params.Default(constants.PIACertificateStrong),
)
if err != nil {
return err
}
settings.ServerSelection.EncryptionPreset = encryptionPreset
settings.ExtraConfigOptions.EncryptionPreset = encryptionPreset
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.PIAGeoChoices())
if err != nil {
return err
}
settings.ServerSelection.CustomPort, err = readPortOrZero(r.env, "PORT")
if err != nil {
return err
}
settings.PortForwarding.Enabled, err = r.env.OnOff("PORT_FORWARDING", params.Default("off"))
if err != nil {
return err
}
if settings.PortForwarding.Enabled {
settings.PortForwarding.Filepath, err = r.env.Path("PORT_FORWARDING_STATUS_FILE",
params.Default("/tmp/gluetun/forwarded_port"), params.CaseSensitiveValue())
if err != nil {
return err
}
}
return nil
}

View File

@@ -0,0 +1,52 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) privatevpnLines() (lines []string) {
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
func (settings *Provider) readPrivatevpn(r reader) (err error) {
settings.Name = constants.Privatevpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.PrivatevpnCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.PrivatevpnCityChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.PrivatevpnHostnameChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,75 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) protonvpnLines() (lines []string) {
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Names) > 0 {
lines = append(lines, lastIndent+"Names: "+commaJoin(settings.ServerSelection.Names))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
func (settings *Provider) readProtonvpn(r reader) (err error) {
settings.Name = constants.Protonvpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.CustomPort, err = readPortOrZero(r.env, "PORT")
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.ProtonvpnCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.ProtonvpnRegionChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.ProtonvpnCityChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_NAME", constants.ProtonvpnNameChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.ProtonvpnHostnameChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,115 @@
package configuration
import (
"errors"
"fmt"
"net"
"strings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params"
)
// Provider contains settings specific to a VPN provider.
type Provider struct {
Name string `json:"name"`
ServerSelection ServerSelection `json:"server_selection"`
ExtraConfigOptions ExtraConfigOptions `json:"extra_config"`
PortForwarding PortForwarding `json:"port_forwarding"`
}
func (settings *Provider) lines() (lines []string) {
lines = append(lines, lastIndent+strings.Title(settings.Name)+" settings:")
lines = append(lines, indent+lastIndent+"Network protocol: "+settings.ServerSelection.Protocol)
if settings.ServerSelection.TargetIP != nil {
lines = append(lines, indent+lastIndent+"Target IP address: "+settings.ServerSelection.TargetIP.String())
}
var providerLines []string
switch strings.ToLower(settings.Name) {
case "cyberghost":
providerLines = settings.cyberghostLines()
case "fastestvpn":
providerLines = settings.fastestvpnLines()
case "hidemyass":
providerLines = settings.hideMyAssLines()
case "mullvad":
providerLines = settings.mullvadLines()
case "nordvpn":
providerLines = settings.nordvpnLines()
case "privado":
providerLines = settings.privadoLines()
case "privatevpn":
providerLines = settings.privatevpnLines()
case "private internet access":
providerLines = settings.privateinternetaccessLines()
case "protonvpn":
providerLines = settings.protonvpnLines()
case "purevpn":
providerLines = settings.purevpnLines()
case "surfshark":
providerLines = settings.surfsharkLines()
case "torguard":
providerLines = settings.torguardLines()
case "vyprvpn":
providerLines = settings.vyprvpnLines()
case "windscribe":
providerLines = settings.windscribeLines()
default:
panic(`Missing lines method for provider "` +
settings.Name + `"! Please create a Github issue.`)
}
for _, line := range providerLines {
lines = append(lines, indent+line)
}
return lines
}
func commaJoin(slice []string) string {
return strings.Join(slice, ", ")
}
func readProtocol(env params.Env) (protocol string, err error) {
return env.Inside("PROTOCOL", []string{constants.TCP, constants.UDP}, params.Default(constants.UDP))
}
func readTargetIP(env params.Env) (targetIP net.IP, err error) {
return readIP(env, "OPENVPN_TARGET_IP")
}
var (
ErrInvalidProtocol = errors.New("invalid network protocol")
)
func readCustomPort(env params.Env, protocol string,
allowedTCP, allowedUDP []uint16) (port uint16, err error) {
port, err = readPortOrZero(env, "PORT")
if err != nil {
return 0, err
} else if port == 0 {
return 0, nil
}
switch protocol {
case constants.TCP:
for i := range allowedTCP {
if allowedTCP[i] == port {
return port, nil
}
}
return 0, fmt.Errorf("%w: port %d for TCP protocol", ErrInvalidPort, port)
case constants.UDP:
for i := range allowedUDP {
if allowedUDP[i] == port {
return port, nil
}
}
return 0, fmt.Errorf("%w: port %d for UDP protocol", ErrInvalidPort, port)
default:
return 0, fmt.Errorf("%w: %s", ErrInvalidProtocol, protocol)
}
}

View File

@@ -0,0 +1,337 @@
package configuration
import (
"errors"
"testing"
"github.com/golang/mock/gomock"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/golibs/params/mock_params"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var errDummy = errors.New("dummy")
func Test_Provider_lines(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
settings Provider
lines []string
}{
"cyberghost": {
settings: Provider{
Name: constants.Cyberghost,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Group: "group",
Regions: []string{"a", "El country"},
},
ExtraConfigOptions: ExtraConfigOptions{
ClientKey: "a",
ClientCertificate: "a",
},
},
lines: []string{
"|--Cyberghost settings:",
" |--Network protocol: udp",
" |--Server group: group",
" |--Regions: a, El country",
" |--Client key is set",
" |--Client certificate is set",
},
},
"fastestvpn": {
settings: Provider{
Name: constants.Fastestvpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Hostnames: []string{"a", "b"},
Countries: []string{"c", "d"},
},
},
lines: []string{
"|--Fastestvpn settings:",
" |--Network protocol: udp",
" |--Hostnames: a, b",
" |--Countries: c, d",
},
},
"hidemyass": {
settings: Provider{
Name: constants.HideMyAss,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Countries: []string{"a", "b"},
Cities: []string{"c", "d"},
Hostnames: []string{"e", "f"},
},
},
lines: []string{
"|--Hidemyass settings:",
" |--Network protocol: udp",
" |--Countries: a, b",
" |--Cities: c, d",
" |--Hostnames: e, f",
},
},
"mullvad": {
settings: Provider{
Name: constants.Mullvad,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Countries: []string{"a", "b"},
Cities: []string{"c", "d"},
ISPs: []string{"e", "f"},
CustomPort: 1,
},
ExtraConfigOptions: ExtraConfigOptions{
OpenVPNIPv6: true,
},
},
lines: []string{
"|--Mullvad settings:",
" |--Network protocol: udp",
" |--Countries: a, b",
" |--Cities: c, d",
" |--ISPs: e, f",
" |--Custom port: 1",
" |--IPv6: enabled",
},
},
"nordvpn": {
settings: Provider{
Name: constants.Nordvpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
Numbers: []uint16{1, 2},
},
},
lines: []string{
"|--Nordvpn settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
" |--Numbers: 1, 2",
},
},
"privado": {
settings: Provider{
Name: constants.Privado,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Hostnames: []string{"a", "b"},
},
},
lines: []string{
"|--Privado settings:",
" |--Network protocol: udp",
" |--Hostnames: a, b",
},
},
"privatevpn": {
settings: Provider{
Name: constants.Privatevpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Hostnames: []string{"a", "b"},
Countries: []string{"c", "d"},
Cities: []string{"e", "f"},
},
},
lines: []string{
"|--Privatevpn settings:",
" |--Network protocol: udp",
" |--Countries: c, d",
" |--Cities: e, f",
" |--Hostnames: a, b",
},
},
"protonvpn": {
settings: Provider{
Name: constants.Protonvpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Countries: []string{"a", "b"},
Regions: []string{"c", "d"},
Cities: []string{"e", "f"},
Names: []string{"g", "h"},
Hostnames: []string{"i", "j"},
},
},
lines: []string{
"|--Protonvpn settings:",
" |--Network protocol: udp",
" |--Countries: a, b",
" |--Regions: c, d",
" |--Cities: e, f",
" |--Names: g, h",
" |--Hostnames: i, j",
},
},
"private internet access": {
settings: Provider{
Name: constants.PrivateInternetAccess,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
EncryptionPreset: constants.PIAEncryptionPresetStrong,
CustomPort: 1,
},
PortForwarding: PortForwarding{
Enabled: true,
Filepath: string("/here"),
},
},
lines: []string{
"|--Private Internet Access settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
" |--Encryption preset: strong",
" |--Custom port: 1",
" |--Port forwarding:",
" |--File path: /here",
},
},
"purevpn": {
settings: Provider{
Name: constants.Purevpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
Countries: []string{"c", "d"},
Cities: []string{"e", "f"},
},
},
lines: []string{
"|--Purevpn settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
" |--Countries: c, d",
" |--Cities: e, f",
},
},
"surfshark": {
settings: Provider{
Name: constants.Surfshark,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
},
},
lines: []string{
"|--Surfshark settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
},
},
"torguard": {
settings: Provider{
Name: constants.Torguard,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Countries: []string{"a", "b"},
Cities: []string{"c", "d"},
Hostnames: []string{"e"},
},
},
lines: []string{
"|--Torguard settings:",
" |--Network protocol: udp",
" |--Countries: a, b",
" |--Cities: c, d",
" |--Hostnames: e",
},
},
"vyprvpn": {
settings: Provider{
Name: constants.Vyprvpn,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
},
},
lines: []string{
"|--Vyprvpn settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
},
},
"windscribe": {
settings: Provider{
Name: constants.Windscribe,
ServerSelection: ServerSelection{
Protocol: constants.UDP,
Regions: []string{"a", "b"},
Cities: []string{"c", "d"},
Hostnames: []string{"e", "f"},
CustomPort: 1,
},
},
lines: []string{
"|--Windscribe settings:",
" |--Network protocol: udp",
" |--Regions: a, b",
" |--Cities: c, d",
" |--Hostnames: e, f",
" |--Custom port: 1",
},
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
lines := testCase.settings.lines()
assert.Equal(t, testCase.lines, lines)
})
}
}
func Test_readProtocol(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
mockStr string
mockErr error
protocol string
err error
}{
"error": {
mockErr: errDummy,
err: errDummy,
},
"success": {
mockStr: "tcp",
protocol: constants.TCP,
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
ctrl := gomock.NewController(t)
env := mock_params.NewMockEnv(ctrl)
env.EXPECT().
Inside("PROTOCOL", []string{"tcp", "udp"}, gomock.Any()).
Return(testCase.mockStr, testCase.mockErr)
protocol, err := readProtocol(env)
if testCase.err != nil {
require.Error(t, err)
assert.Equal(t, testCase.err.Error(), err.Error())
} else {
assert.NoError(t, err)
}
assert.Equal(t, testCase.protocol, protocol)
})
}
}

View File

@@ -0,0 +1,46 @@
package configuration
import (
"strings"
"time"
"github.com/qdm12/golibs/params"
)
type PublicIP struct {
Period time.Duration `json:"period"`
IPFilepath string `json:"ip_filepath"`
}
func (settings *PublicIP) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *PublicIP) lines() (lines []string) {
if settings.Period == 0 {
lines = append(lines, lastIndent+"Public IP getter: disabled")
return lines
}
lines = append(lines, lastIndent+"Public IP getter:")
lines = append(lines, indent+lastIndent+"Fetch period: "+settings.Period.String())
lines = append(lines, indent+lastIndent+"IP file: "+settings.IPFilepath)
return lines
}
func (settings *PublicIP) read(r reader) (err error) {
settings.Period, err = r.env.Duration("PUBLICIP_PERIOD", params.Default("12h"))
if err != nil {
return err
}
settings.IPFilepath, err = r.env.Path("PUBLICIP_FILE", params.CaseSensitiveValue(),
params.Default("/tmp/gluetun/ip"),
params.RetroKeys([]string{"IP_STATUS_FILE"}, r.onRetroActive))
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,52 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) purevpnLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
return lines
}
func (settings *Provider) readPurevpn(r reader) (err error) {
settings.Name = constants.Purevpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.PurevpnRegionChoices())
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.PurevpnCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.PurevpnCityChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,129 @@
package configuration
import (
"errors"
"fmt"
"net"
"strconv"
"strings"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/params"
"github.com/qdm12/golibs/verification"
)
type reader struct {
env params.Env
logger logging.Logger
regex verification.Regex
os os.OS
}
func newReader(env params.Env, os os.OS, logger logging.Logger) reader {
return reader{
env: env,
logger: logger,
regex: verification.NewRegex(),
os: os,
}
}
func (r *reader) onRetroActive(oldKey, newKey string) {
r.logger.Warn(
"You are using the old environment variable %s, please consider changing it to %s",
oldKey, newKey,
)
}
var (
ErrInvalidPort = errors.New("invalid port")
)
func readCSVPorts(env params.Env, key string) (ports []uint16, err error) {
s, err := env.Get(key)
if err != nil {
return nil, err
} else if len(s) == 0 {
return nil, nil
}
portsStr := strings.Split(s, ",")
ports = make([]uint16, len(portsStr))
for i, portStr := range portsStr {
portInt, err := strconv.Atoi(portStr)
if err != nil {
return nil, fmt.Errorf("%w: %q from environment variable %s: %s",
ErrInvalidPort, portStr, key, err)
} else if portInt <= 0 || portInt > 65535 {
return nil, fmt.Errorf("%w: %d from environment variable %s: must be between 1 and 65535",
ErrInvalidPort, portInt, key)
}
ports[i] = uint16(portInt)
}
return ports, nil
}
var (
ErrInvalidIPNet = errors.New("invalid IP network")
)
func readCSVIPNets(env params.Env, key string, options ...params.OptionSetter) (
ipNets []net.IPNet, err error) {
s, err := env.Get(key, options...)
if err != nil {
return nil, err
} else if s == "" {
return nil, nil
}
ipNetsStr := strings.Split(s, ",")
ipNets = make([]net.IPNet, len(ipNetsStr))
for i, ipNetStr := range ipNetsStr {
_, ipNet, err := net.ParseCIDR(ipNetStr)
if err != nil {
return nil, fmt.Errorf("%w: %q from environment variable %s: %s",
ErrInvalidIPNet, ipNetStr, key, err)
} else if ipNet == nil {
return nil, fmt.Errorf("%w: %q from environment variable %s: subnet is nil",
ErrInvalidIPNet, ipNetStr, key)
}
ipNets[i] = *ipNet
}
return ipNets, nil
}
var (
ErrInvalidIP = errors.New("invalid IP address")
)
func readIP(env params.Env, key string) (ip net.IP, err error) {
s, err := env.Get(key)
if len(s) == 0 {
return nil, nil
} else if err != nil {
return nil, err
}
ip = net.ParseIP(s)
if ip == nil {
return nil, fmt.Errorf("%w: %s", ErrInvalidIP, s)
}
return ip, nil
}
func readPortOrZero(env params.Env, key string) (port uint16, err error) {
s, err := env.Get(key)
if err != nil {
return 0, err
}
if len(s) == 0 || s == "0" {
return 0, nil
}
return env.Port(key)
}

View File

@@ -0,0 +1,109 @@
package configuration
import (
"errors"
"fmt"
"io/ioutil"
"strings"
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/params"
)
var (
ErrGetSecretFilepath = errors.New("cannot get secret file path from env")
ErrReadSecretFile = errors.New("cannot read secret file")
ErrSecretFileIsEmpty = errors.New("secret file is empty")
ErrReadNonSecretFile = errors.New("cannot read non secret file")
ErrFilesDoNotExist = errors.New("files do not exist")
)
func (r *reader) getFromEnvOrSecretFile(envKey string, compulsory bool, retroKeys []string) (value string, err error) {
envOptions := []params.OptionSetter{
params.Compulsory(), // to fallback on file reading
params.CaseSensitiveValue(),
params.Unset(),
params.RetroKeys(retroKeys, r.onRetroActive),
}
value, envErr := r.env.Get(envKey, envOptions...)
if envErr == nil {
return value, nil
}
defaultSecretFile := "/run/secrets/" + strings.ToLower(envKey)
filepath, err := r.env.Get(envKey+"_SECRETFILE",
params.CaseSensitiveValue(),
params.Default(defaultSecretFile),
)
if err != nil {
return "", fmt.Errorf("%w: %s", ErrGetSecretFilepath, err)
}
file, fileErr := r.os.OpenFile(filepath, os.O_RDONLY, 0)
if os.IsNotExist(fileErr) {
if compulsory {
return "", envErr
}
return "", nil
} else if fileErr != nil {
return "", fmt.Errorf("%w: %s", ErrReadSecretFile, fileErr)
}
b, err := ioutil.ReadAll(file)
if err != nil {
return "", fmt.Errorf("%w: %s", ErrReadSecretFile, err)
}
value = string(b)
value = strings.TrimSuffix(value, "\n")
if compulsory && len(value) == 0 {
return "", ErrSecretFileIsEmpty
}
return value, nil
}
// Tries to read from the secret file then the non secret file.
func (r *reader) getFromFileOrSecretFile(secretName, filepath string) (
b []byte, err error) {
defaultSecretFile := "/run/secrets/" + strings.ToLower(secretName)
secretFilepath, err := r.env.Get(strings.ToUpper(secretName)+"_SECRETFILE",
params.CaseSensitiveValue(),
params.Default(defaultSecretFile),
)
if err != nil {
return b, fmt.Errorf("%w: %s", ErrGetSecretFilepath, err)
}
b, err = readFromFile(r.os.OpenFile, secretFilepath)
if err != nil && !os.IsNotExist(err) {
return b, fmt.Errorf("%w: %s", ErrReadSecretFile, err)
} else if err == nil {
return b, nil
}
// Secret file does not exist, try the non secret file
b, err = readFromFile(r.os.OpenFile, filepath)
if err != nil && !os.IsNotExist(err) {
return nil, fmt.Errorf("%w: %s", ErrReadSecretFile, err)
} else if err == nil {
return b, nil
}
return nil, fmt.Errorf("%w: %s and %s", ErrFilesDoNotExist, secretFilepath, filepath)
}
func readFromFile(openFile os.OpenFileFunc, filepath string) (b []byte, err error) {
file, err := openFile(filepath, os.O_RDONLY, 0)
if err != nil {
return nil, err
}
b, err = ioutil.ReadAll(file)
if err != nil {
_ = file.Close()
return nil, err
}
if err := file.Close(); err != nil {
return nil, err
}
return b, nil
}

View File

@@ -0,0 +1,54 @@
package configuration
import (
"net"
)
type ServerSelection struct {
// Common
Protocol string `json:"network_protocol"`
TargetIP net.IP `json:"target_ip,omitempty"`
// TODO comments
// Cyberghost, PIA, Protonvpn, Surfshark, Windscribe, Vyprvpn, NordVPN
Regions []string `json:"regions"`
// Cyberghost
Group string `json:"group"`
Countries []string `json:"countries"` // Fastestvpn, HideMyAss, Mullvad, PrivateVPN, Protonvpn, PureVPN
Cities []string `json:"cities"` // HideMyAss, Mullvad, PrivateVPN, Protonvpn, PureVPN, Windscribe
Hostnames []string `json:"hostnames"` // Fastestvpn, HideMyAss, PrivateVPN, Windscribe, Privado, Protonvpn
Names []string `json:"names"` // Protonvpn
// Mullvad
ISPs []string `json:"isps"`
Owned bool `json:"owned"`
// Mullvad, Windscribe, PIA
CustomPort uint16 `json:"custom_port"`
// NordVPN
Numbers []uint16 `json:"numbers"`
// PIA
EncryptionPreset string `json:"encryption_preset"`
}
type ExtraConfigOptions struct {
ClientCertificate string `json:"-"` // Cyberghost
ClientKey string `json:"-"` // Cyberghost
EncryptionPreset string `json:"encryption_preset"` // PIA
OpenVPNIPv6 bool `json:"openvpn_ipv6"` // Mullvad
}
// PortForwarding contains settings for port forwarding.
type PortForwarding struct {
Enabled bool `json:"enabled"`
Filepath string `json:"filepath"`
}
func (p *PortForwarding) lines() (lines []string) {
return []string{
lastIndent + "File path: " + p.Filepath,
}
}

View File

@@ -0,0 +1,49 @@
package configuration
import (
"strconv"
"strings"
"github.com/qdm12/golibs/params"
)
// ControlServer contains settings to customize the control server operation.
type ControlServer struct {
Port uint16
Log bool
}
func (settings *ControlServer) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *ControlServer) lines() (lines []string) {
lines = append(lines, lastIndent+"HTTP control server:")
lines = append(lines, indent+lastIndent+"Listening port: "+strconv.Itoa(int(settings.Port)))
if settings.Log {
lines = append(lines, indent+lastIndent+"Logging: enabled")
}
return lines
}
func (settings *ControlServer) read(r reader) (err error) {
settings.Log, err = r.env.OnOff("HTTP_CONTROL_SERVER_LOG", params.Default("on"))
if err != nil {
return err
}
var warning string
settings.Port, warning, err = r.env.ListeningPort(
"HTTP_CONTROL_SERVER_PORT", params.Default("8000"))
if len(warning) > 0 {
r.logger.Warn(warning)
}
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,97 @@
package configuration
import (
"strings"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/os"
"github.com/qdm12/golibs/params"
)
// Settings contains all settings for the program to run.
type Settings struct {
OpenVPN OpenVPN
System System
DNS DNS
Firewall Firewall
HTTPProxy HTTPProxy
ShadowSocks ShadowSocks
Updater Updater
PublicIP PublicIP
VersionInformation bool
ControlServer ControlServer
}
func (settings *Settings) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *Settings) lines() (lines []string) {
lines = append(lines, "Settings summary below:")
lines = append(lines, settings.OpenVPN.lines()...)
lines = append(lines, settings.DNS.lines()...)
lines = append(lines, settings.Firewall.lines()...)
lines = append(lines, settings.System.lines()...)
lines = append(lines, settings.HTTPProxy.lines()...)
lines = append(lines, settings.ShadowSocks.lines()...)
lines = append(lines, settings.ControlServer.lines()...)
lines = append(lines, settings.Updater.lines()...)
lines = append(lines, settings.PublicIP.lines()...)
if settings.VersionInformation {
lines = append(lines, lastIndent+"Github version information: enabled")
}
return lines
}
// Read obtains all configuration options for the program and returns an error as soon
// as an error is encountered reading them.
func (settings *Settings) Read(env params.Env, os os.OS, logger logging.Logger) (err error) {
r := newReader(env, os, logger)
settings.VersionInformation, err = r.env.OnOff("VERSION_INFORMATION", params.Default("on"))
if err != nil {
return err
}
if err := settings.OpenVPN.read(r); err != nil {
return err
}
if err := settings.System.read(r); err != nil {
return err
}
if err := settings.DNS.read(r); err != nil {
return err
}
if err := settings.Firewall.read(r); err != nil {
return err
}
if err := settings.HTTPProxy.read(r); err != nil {
return err
}
if err := settings.ShadowSocks.read(r); err != nil {
return err
}
if err := settings.ControlServer.read(r); err != nil {
return err
}
if err := settings.Updater.read(r); err != nil {
return err
}
if ip := settings.DNS.PlaintextAddress; ip != nil {
settings.Updater.DNSAddress = ip.String()
}
if err := settings.PublicIP.read(r); err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,55 @@
package configuration
import (
"testing"
"github.com/qdm12/gluetun/internal/constants"
"github.com/stretchr/testify/assert"
)
func Test_Settings_lines(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
settings Settings
lines []string
}{
"default settings": {
settings: Settings{
OpenVPN: OpenVPN{
Provider: Provider{
Name: constants.Mullvad,
},
},
},
lines: []string{
"Settings summary below:",
"|--OpenVPN:",
" |--Verbosity level: 0",
" |--Provider:",
" |--Mullvad settings:",
" |--Network protocol: ",
"|--DNS:",
"|--Firewall: disabled ⚠️",
"|--System:",
" |--Process user ID: 0",
" |--Process group ID: 0",
" |--Timezone: NOT SET ⚠️ - it can cause time related issues",
"|--HTTP control server:",
" |--Listening port: 0",
"|--Public IP getter: disabled",
},
},
}
for name, testCase := range testCases {
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
lines := testCase.settings.lines()
assert.Equal(t, testCase.lines, lines)
})
}
}

View File

@@ -0,0 +1,72 @@
package configuration
import (
"strconv"
"strings"
"github.com/qdm12/golibs/params"
)
// ShadowSocks contains settings to configure the Shadowsocks server.
type ShadowSocks struct {
Method string
Password string
Port uint16
Enabled bool
Log bool
}
func (settings *ShadowSocks) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *ShadowSocks) lines() (lines []string) {
if !settings.Enabled {
return nil
}
lines = append(lines, lastIndent+"Shadowsocks server:")
lines = append(lines, indent+lastIndent+"Listening port: "+strconv.Itoa(int(settings.Port)))
lines = append(lines, indent+lastIndent+"Method: "+settings.Method)
if settings.Log {
lines = append(lines, indent+lastIndent+"Logging: enabled")
}
return lines
}
func (settings *ShadowSocks) read(r reader) (err error) {
settings.Enabled, err = r.env.OnOff("SHADOWSOCKS", params.Default("off"))
if err != nil || !settings.Enabled {
return err
}
settings.Password, err = r.getFromEnvOrSecretFile("SHADOWSOCKS_PASSWORD", false, nil)
if err != nil {
return err
}
settings.Log, err = r.env.OnOff("SHADOWSOCKS_LOG", params.Default("off"))
if err != nil {
return err
}
settings.Method, err = r.env.Get("SHADOWSOCKS_METHOD", params.Default("chacha20-ietf-poly1305"))
if err != nil {
return err
}
var warning string
settings.Port, warning, err = r.env.ListeningPort("SHADOWSOCKS_PORT", params.Default("8388"))
if len(warning) > 0 {
r.logger.Warn(warning)
}
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,34 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) surfsharkLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
return lines
}
func (settings *Provider) readSurfshark(r reader) (err error) {
settings.Name = constants.Surfshark
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.SurfsharkRegionChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,53 @@
package configuration
import (
"strconv"
"strings"
"github.com/qdm12/golibs/params"
)
// System contains settings to configure system related elements.
type System struct {
PUID int
PGID int
Timezone string
}
func (settings *System) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *System) lines() (lines []string) {
lines = append(lines, lastIndent+"System:")
lines = append(lines, indent+lastIndent+"Process user ID: "+strconv.Itoa(settings.PUID))
lines = append(lines, indent+lastIndent+"Process group ID: "+strconv.Itoa(settings.PGID))
if len(settings.Timezone) > 0 {
lines = append(lines, indent+lastIndent+"Timezone: "+settings.Timezone)
} else {
lines = append(lines, indent+lastIndent+"Timezone: NOT SET ⚠️ - it can cause time related issues")
}
return lines
}
func (settings *System) read(r reader) (err error) {
settings.PUID, err = r.env.IntRange("PUID", 0, 65535, params.Default("1000"),
params.RetroKeys([]string{"UID"}, r.onRetroActive))
if err != nil {
return err
}
settings.PGID, err = r.env.IntRange("PGID", 0, 65535, params.Default("1000"),
params.RetroKeys([]string{"GID"}, r.onRetroActive))
if err != nil {
return err
}
settings.Timezone, err = r.env.Get("TZ")
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,52 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) torguardLines() (lines []string) {
if len(settings.ServerSelection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(settings.ServerSelection.Countries))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
func (settings *Provider) readTorguard(r reader) (err error) {
settings.Name = constants.Torguard
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY", constants.TorguardCountryChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.TorguardCityChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.TorguardHostnamesChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,133 @@
package configuration
import (
"errors"
"fmt"
"net"
"strings"
unbound "github.com/qdm12/dns/pkg/unbound"
"github.com/qdm12/golibs/params"
)
func (settings *DNS) readUnbound(r reader) (err error) {
if err := settings.readUnboundProviders(r.env); err != nil {
return err
}
settings.Unbound.ListeningPort = 53
settings.Unbound.Caching, err = r.env.OnOff("DOT_CACHING", params.Default("on"))
if err != nil {
return err
}
settings.Unbound.IPv4 = true
settings.Unbound.IPv6, err = r.env.OnOff("DOT_IPV6", params.Default("off"))
if err != nil {
return err
}
verbosityLevel, err := r.env.IntRange("DOT_VERBOSITY", 0, 5, params.Default("1"))
if err != nil {
return err
}
settings.Unbound.VerbosityLevel = uint8(verbosityLevel)
verbosityDetailsLevel, err := r.env.IntRange("DOT_VERBOSITY_DETAILS", 0, 4, params.Default("0"))
if err != nil {
return err
}
settings.Unbound.VerbosityDetailsLevel = uint8(verbosityDetailsLevel)
validationLogLevel, err := r.env.IntRange("DOT_VALIDATION_LOGLEVEL", 0, 2, params.Default("0"))
if err != nil {
return err
}
settings.Unbound.ValidationLogLevel = uint8(validationLogLevel)
if err := settings.readUnboundPrivateAddresses(r.env); err != nil {
return err
}
if err := settings.readUnboundUnblockedHostnames(r); err != nil {
return err
}
settings.Unbound.AccessControl.Allowed = []net.IPNet{
{
IP: net.IPv4zero,
Mask: net.IPv4Mask(0, 0, 0, 0),
},
{
IP: net.IPv6zero,
Mask: net.IPMask{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
}
return nil
}
var (
ErrInvalidDNSOverTLSProvider = errors.New("invalid DNS over TLS provider")
)
func (settings *DNS) readUnboundProviders(env params.Env) (err error) {
s, err := env.Get("DOT_PROVIDERS", params.Default("cloudflare"))
if err != nil {
return err
}
for _, provider := range strings.Split(s, ",") {
_, ok := unbound.GetProviderData(provider)
if !ok {
return fmt.Errorf("%w: %s", ErrInvalidDNSOverTLSProvider, provider)
}
settings.Unbound.Providers = append(settings.Unbound.Providers, provider)
}
return nil
}
var (
ErrInvalidPrivateAddress = errors.New("private address is not a valid IP or CIDR range")
)
func (settings *DNS) readUnboundPrivateAddresses(env params.Env) (err error) {
privateAddresses, err := env.CSV("DOT_PRIVATE_ADDRESS")
if err != nil {
return err
} else if len(privateAddresses) == 0 {
return nil
}
for _, address := range privateAddresses {
ip := net.ParseIP(address)
_, _, err := net.ParseCIDR(address)
if ip == nil && err != nil {
return fmt.Errorf("%w: %s", ErrInvalidPrivateAddress, address)
}
}
settings.Unbound.BlockedIPs = append(
settings.Unbound.BlockedIPs, privateAddresses...)
return nil
}
var (
ErrInvalidHostname = errors.New("invalid hostname")
)
func (settings *DNS) readUnboundUnblockedHostnames(r reader) (err error) {
hostnames, err := r.env.CSV("UNBLOCK")
if err != nil {
return err
} else if len(hostnames) == 0 {
return nil
}
for _, hostname := range hostnames {
if !r.regex.MatchHostname(hostname) {
return fmt.Errorf("%w: %s", ErrInvalidHostname, hostname)
}
}
settings.Unbound.AllowedHostnames = append(
settings.Unbound.AllowedHostnames, hostnames...)
return nil
}

View File

@@ -0,0 +1,77 @@
package configuration
import (
"strings"
"time"
"github.com/qdm12/golibs/params"
)
type Updater struct {
Period time.Duration `json:"period"`
DNSAddress string `json:"dns_address"`
Cyberghost bool `json:"cyberghost"`
Fastestvpn bool `json:"fastestvpn"`
HideMyAss bool `json:"hidemyass"`
Mullvad bool `json:"mullvad"`
Nordvpn bool `json:"nordvpn"`
PIA bool `json:"pia"`
Privado bool `json:"privado"`
Privatevpn bool `json:"privatevpn"`
Protonvpn bool `json:"protonvpn"`
Purevpn bool `json:"purevpn"`
Surfshark bool `json:"surfshark"`
Torguard bool `json:"torguard"`
Vyprvpn bool `json:"vyprvpn"`
Windscribe bool `json:"windscribe"`
// The two below should be used in CLI mode only
Stdout bool `json:"-"` // in order to update constants file (maintainer side)
CLI bool `json:"-"`
}
func (settings *Updater) String() string {
return strings.Join(settings.lines(), "\n")
}
func (settings *Updater) lines() (lines []string) {
if settings.Period == 0 {
return nil
}
lines = append(lines, lastIndent+"Updater:")
lines = append(lines, indent+lastIndent+"Period: every "+settings.Period.String())
return lines
}
func (settings *Updater) read(r reader) (err error) {
settings.Cyberghost = true
settings.HideMyAss = true
settings.Mullvad = true
settings.Nordvpn = true
settings.Privado = true
settings.PIA = true
settings.Privado = true
settings.Privatevpn = true
settings.Protonvpn = true
settings.Purevpn = true
settings.Surfshark = true
settings.Torguard = true
settings.Vyprvpn = true
settings.Windscribe = true
settings.Stdout = false
settings.CLI = false
// use cloudflare in plaintext to not be blocked by DNS over TLS by default.
// If a plaintext address is set in the DNS settings, this one will be used.
// TODO use custom future encrypted DNS written in Go without blocking
// as it's too much trouble to start another parallel unbound instance for now.
settings.DNSAddress = "1.1.1.1"
settings.Period, err = r.env.Duration("UPDATER_PERIOD", params.Default("0"))
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,34 @@
package configuration
import (
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) vyprvpnLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
return lines
}
func (settings *Provider) readVyprvpn(r reader) (err error) {
settings.Name = constants.Vyprvpn
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.VyprvpnRegionChoices())
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,63 @@
package configuration
import (
"strconv"
"github.com/qdm12/gluetun/internal/constants"
)
func (settings *Provider) windscribeLines() (lines []string) {
if len(settings.ServerSelection.Regions) > 0 {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if len(settings.ServerSelection.Cities) > 0 {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort)))
return lines
}
func (settings *Provider) readWindscribe(r reader) (err error) {
settings.Name = constants.Windscribe
settings.ServerSelection.Protocol, err = readProtocol(r.env)
if err != nil {
return err
}
settings.ServerSelection.TargetIP, err = readTargetIP(r.env)
if err != nil {
return err
}
settings.ServerSelection.Regions, err = r.env.CSVInside("REGION", constants.WindscribeRegionChoices())
if err != nil {
return err
}
settings.ServerSelection.Cities, err = r.env.CSVInside("CITY", constants.WindscribeCityChoices())
if err != nil {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.WindscribeHostnameChoices())
if err != nil {
return err
}
settings.ServerSelection.CustomPort, err = readCustomPort(r.env, settings.ServerSelection.Protocol,
[]uint16{21, 22, 80, 123, 143, 443, 587, 1194, 3306, 8080, 54783},
[]uint16{53, 80, 123, 443, 1194, 54783})
if err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,5 @@
package constants
const (
HealthcheckAddress = "127.0.0.1:9999"
)

View File

@@ -0,0 +1,11 @@
package constants
import "github.com/fatih/color"
func ColorUnbound() *color.Color {
return color.New(color.FgCyan)
}
func ColorOpenvpn() *color.Color {
return color.New(color.FgHiMagenta)
}

View File

@@ -0,0 +1,25 @@
// Package constants defines constants shared throughout the program.
// It also defines constant maps and slices using functions.
package constants
import "sort"
func makeChoicesUnique(choices []string) []string {
uniqueChoices := map[string]struct{}{}
for _, choice := range choices {
uniqueChoices[choice] = struct{}{}
}
uniqueChoicesSlice := make([]string, len(uniqueChoices))
i := 0
for choice := range uniqueChoices {
uniqueChoicesSlice[i] = choice
i++
}
sort.Slice(uniqueChoicesSlice, func(i, j int) bool {
return uniqueChoicesSlice[i] < uniqueChoicesSlice[j]
})
return uniqueChoicesSlice
}

View File

@@ -0,0 +1,255 @@
package constants
func CountryCodes() map[string]string {
return map[string]string{
"af": "Afghanistan",
"ax": "Aland Islands",
"al": "Albania",
"dz": "Algeria",
"as": "American Samoa",
"ad": "Andorra",
"ao": "Angola",
"ai": "Anguilla",
"aq": "Antarctica",
"ag": "Antigua and Barbuda",
"ar": "Argentina",
"am": "Armenia",
"aw": "Aruba",
"au": "Australia",
"at": "Austria",
"az": "Azerbaijan",
"bs": "Bahamas",
"bh": "Bahrain",
"bd": "Bangladesh",
"bb": "Barbados",
"by": "Belarus",
"be": "Belgium",
"bz": "Belize",
"bj": "Benin",
"bm": "Bermuda",
"bt": "Bhutan",
"bo": "Bolivia",
"bq": "Bonaire",
"ba": "Bosnia and Herzegovina",
"bw": "Botswana",
"bv": "Bouvet Island",
"br": "Brazil",
"io": "British Indian Ocean Territory",
"vg": "British Virgin Islands",
"bn": "Brunei Darussalam",
"bg": "Bulgaria",
"bf": "Burkina Faso",
"bi": "Burundi",
"kh": "Cambodia",
"cm": "Cameroon",
"ca": "Canada",
"cv": "Cape Verde",
"ky": "Cayman Islands",
"cf": "Central African Republic",
"td": "Chad",
"cl": "Chile",
"cn": "China",
"cx": "Christmas Island",
"cc": "Cocos Islands",
"co": "Colombia",
"km": "Comoros",
"cg": "Congo",
"ck": "Cook Islands",
"cr": "Costa Rica",
"ci": "Cote d'Ivoire",
"hr": "Croatia",
"cu": "Cuba",
"cw": "Curacao",
"cy": "Cyprus",
"cz": "Czech Republic",
"cd": "Democratic Republic of the Congo",
"dk": "Denmark",
"dj": "Djibouti",
"dm": "Dominica",
"do": "Dominican Republic",
"ec": "Ecuador",
"eg": "Egypt",
"sv": "El Salvador",
"gq": "Equatorial Guinea",
"er": "Eritrea",
"ee": "Estonia",
"et": "Ethiopia",
"fk": "Falkland Islands",
"fo": "Faroe Islands",
"fj": "Fiji",
"fi": "Finland",
"fr": "France",
"gf": "French Guiana",
"pf": "French Polynesia",
"tf": "French Southern Territories",
"ga": "Gabon",
"gm": "Gambia",
"ge": "Georgia",
"de": "Germany",
"gh": "Ghana",
"gi": "Gibraltar",
"gr": "Greece",
"gl": "Greenland",
"gd": "Grenada",
"gp": "Guadeloupe",
"gu": "Guam",
"gt": "Guatemala",
"gg": "Guernsey",
"gw": "Guinea-Bissau",
"gn": "Guinea",
"gy": "Guyana",
"ht": "Haiti",
"hm": "Heard Island and McDonald Islands",
"hn": "Honduras",
"hk": "Hong Kong",
"hu": "Hungary",
"is": "Iceland",
"in": "India",
"id": "Indonesia",
"ir": "Iran",
"iq": "Iraq",
"ie": "Ireland",
"im": "Isle of Man",
"il": "Israel",
"it": "Italy",
"jm": "Jamaica",
"jp": "Japan",
"je": "Jersey",
"jo": "Jordan",
"kz": "Kazakhstan",
"ke": "Kenya",
"ki": "Kiribati",
"kr": "Korea",
"kw": "Kuwait",
"kg": "Kyrgyzstan",
"la": "Lao People's Democratic Republic",
"lv": "Latvia",
"lb": "Lebanon",
"ls": "Lesotho",
"lr": "Liberia",
"ly": "Libya",
"li": "Liechtenstein",
"lt": "Lithuania",
"lu": "Luxembourg",
"mo": "Macao",
"mk": "Macedonia",
"mg": "Madagascar",
"mw": "Malawi",
"my": "Malaysia",
"mv": "Maldives",
"ml": "Mali",
"mt": "Malta",
"mh": "Marshall Islands",
"mq": "Martinique",
"mr": "Mauritania",
"mu": "Mauritius",
"yt": "Mayotte",
"mx": "Mexico",
"fm": "Micronesia",
"md": "Moldova",
"mc": "Monaco",
"mn": "Mongolia",
"me": "Montenegro",
"ms": "Montserrat",
"ma": "Morocco",
"mz": "Mozambique",
"mm": "Myanmar",
"na": "Namibia",
"nr": "Nauru",
"np": "Nepal",
"nl": "Netherlands",
"nc": "New Caledonia",
"nz": "New Zealand",
"ni": "Nicaragua",
"ne": "Niger",
"ng": "Nigeria",
"nu": "Niue",
"nf": "Norfolk Island",
"mp": "Northern Mariana Islands",
"no": "Norway",
"om": "Oman",
"pk": "Pakistan",
"pw": "Palau",
"ps": "Palestine, State of",
"pa": "Panama",
"pg": "Papua New Guinea",
"py": "Paraguay",
"pe": "Peru",
"ph": "Philippines",
"pn": "Pitcairn",
"pl": "Poland",
"pt": "Portugal",
"pr": "Puerto Rico",
"qa": "Qatar",
"re": "Reunion",
"ro": "Romania",
"ru": "Russian Federation",
"rw": "Rwanda",
"bl": "Saint Barthelemy",
"sh": "Saint Helena",
"kn": "Saint Kitts and Nevis",
"lc": "Saint Lucia",
"mf": "Saint Martin",
"pm": "Saint Pierre and Miquelon",
"vc": "Saint Vincent and the Grenadines",
"ws": "Samoa",
"sm": "San Marino",
"st": "Sao Tome and Principe",
"sa": "Saudi Arabia",
"sn": "Senegal",
"rs": "Serbia",
"sc": "Seychelles",
"sl": "Sierra Leone",
"sg": "Singapore",
"sx": "Sint Maarten",
"sk": "Slovakia",
"si": "Slovenia",
"sb": "Solomon Islands",
"so": "Somalia",
"za": "South Africa",
"gs": "South Georgia and the South Sandwich Islands",
"ss": "South Sudan",
"es": "Spain",
"lk": "Sri Lanka",
"sd": "Sudan",
"sr": "Suriname",
"sj": "Svalbard and Jan Mayen",
"sz": "Swaziland",
"se": "Sweden",
"ch": "Switzerland",
"sy": "Syrian Arab Republic",
"tw": "Taiwan",
"tj": "Tajikistan",
"tz": "Tanzania",
"th": "Thailand",
"tl": "Timor-Leste",
"tg": "Togo",
"tk": "Tokelau",
"to": "Tonga",
"tt": "Trinidad and Tobago",
"tn": "Tunisia",
"tr": "Turkey",
"tm": "Turkmenistan",
"tc": "Turks and Caicos Islands",
"tv": "Tuvalu",
"ug": "Uganda",
"ua": "Ukraine",
"ae": "United Arab Emirates",
"gb": "United Kingdom",
"uk": "United Kingdom",
"um": "United States Minor Outlying Islands",
"us": "United States",
"uy": "Uruguay",
"vi": "US Virgin Islands",
"uz": "Uzbekistan",
"vu": "Vanuatu",
"va": "Vatican City State",
"ve": "Venezuela",
"vn": "Vietnam",
"wf": "Wallis and Futuna",
"eh": "Western Sahara",
"ye": "Yemen",
"zm": "Zambia",
"zw": "Zimbabwe",
}
}

View File

@@ -0,0 +1,194 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
CyberghostCertificate = "MIIGWjCCBEKgAwIBAgIJAJxUG61mxDS7MA0GCSqGSIb3DQEBDQUAMHsxCzAJBgNVBAYTAlJPMRIwEAYDVQQHEwlCdWNoYXJlc3QxGDAWBgNVBAoTD0N5YmVyR2hvc3QgUy5BLjEbMBkGA1UEAxMSQ3liZXJHaG9zdCBSb290IENBMSEwHwYJKoZIhvcNAQkBFhJpbmZvQGN5YmVyZ2hvc3Qucm8wHhcNMTcwNjE5MDgxNzI1WhcNMzcwNjE0MDgxNzI1WjB7MQswCQYDVQQGEwJSTzESMBAGA1UEBxMJQnVjaGFyZXN0MRgwFg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MSEwHwYJKoZIhvcNAQkBFhJpbmZvQGN5YmVyZ2hvc3Qucm+CCQCcVButZsQ0uzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBDQUAA4ICAQDNyQ92kj4qiNjnHk99qvnFw9qGfwB9ofaPL74zh0G5hEe3Wgb2o4fqUGnvUNgOu53gJksz3DcPQ8t40wfmm9I1Z8tiM9qrqvkuQ+nKcLgdooXtEsTybPIYDZ2cWR/5E0TKRvC7RFzKgQ4D77Vbi4TdaHiDV7ZNfU1iLCoBGcYm80hcUHEs5KIVLwUmcSOTmbZBySJxcSD0yUpS7nlZGwLY6VQrU+JFwDSisbXT4DXf3iSzp7FzW0/u/SFvWsPHrjE0hkPoZPalYvouaJEHKAhip0ZwSmitlxbBnmm8+K/3c9mLA5/uXrirfpuhhs8V3lyV2mczVtSiTl6gpi88gc//JY80JeHdupjO25T3XEzY9cpxecmkWaUEjLMx4wVoXQuUiPonfILM6OLwi+zUS8gQErdFeGvcQXbncPa4SdJuHkF8lgiX2i8S8fPGdXvU37E9bdAXwP5nZriYq1s0D59Qfvz+vLXVkmyZp6ztxjKjKolemPMak0Y5c1Q4RjNF6tmQoFuy/ACSkWy14Tzu2dFp7UiVbGg1FOvKhfs48zC2/IUQv1arqmPT/9LVq3B2DVT9UKXRUXX/f/jSSsVjkz4uUe2jUyL+XHX1nSmROTPHSAJ+oKf0BLnfqUxFkEUTwLnayssP2nwGgq35b7wEbTFIXdrjHGFUVQIDeERz8UThew=="
)
func CyberghostRegionChoices() (choices []string) {
servers := CyberghostServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Region
}
return makeUnique(choices)
}
func CyberghostGroupChoices() (choices []string) {
servers := CyberghostServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Group
}
return makeUnique(choices)
}
//nolint:lll
// CyberghostServers returns a slice with the server information for each
// of the Cyberghost server.
func CyberghostServers() []models.CyberghostServer {
return []models.CyberghostServer{
{Region: "Albania", Group: "Premium UDP Europe", IPs: []net.IP{{31, 171, 155, 3}, {31, 171, 155, 4}, {31, 171, 155, 5}, {31, 171, 155, 6}, {31, 171, 155, 7}, {31, 171, 155, 8}, {31, 171, 155, 9}, {31, 171, 155, 11}, {31, 171, 155, 12}, {31, 171, 155, 13}}},
{Region: "Albania", Group: "Premium TCP Europe", IPs: []net.IP{{31, 171, 155, 4}, {31, 171, 155, 5}, {31, 171, 155, 6}, {31, 171, 155, 7}, {31, 171, 155, 8}, {31, 171, 155, 9}, {31, 171, 155, 11}, {31, 171, 155, 12}, {31, 171, 155, 13}, {31, 171, 155, 14}}},
{Region: "Algeria", Group: "Premium UDP Europe", IPs: []net.IP{{176, 125, 228, 131}, {176, 125, 228, 132}, {176, 125, 228, 133}, {176, 125, 228, 135}, {176, 125, 228, 136}, {176, 125, 228, 138}, {176, 125, 228, 139}, {176, 125, 228, 140}, {176, 125, 228, 141}, {176, 125, 228, 144}}},
{Region: "Algeria", Group: "Premium TCP Europe", IPs: []net.IP{{176, 125, 228, 131}, {176, 125, 228, 132}, {176, 125, 228, 134}, {176, 125, 228, 136}, {176, 125, 228, 138}, {176, 125, 228, 139}, {176, 125, 228, 140}, {176, 125, 228, 141}, {176, 125, 228, 142}, {176, 125, 228, 143}}},
{Region: "Andorra", Group: "Premium UDP Europe", IPs: []net.IP{{188, 241, 82, 134}, {188, 241, 82, 135}, {188, 241, 82, 143}, {188, 241, 82, 145}, {188, 241, 82, 152}, {188, 241, 82, 155}, {188, 241, 82, 162}, {188, 241, 82, 163}, {188, 241, 82, 166}, {188, 241, 82, 168}}},
{Region: "Argentina", Group: "Premium UDP USA", IPs: []net.IP{{190, 106, 130, 15}, {190, 106, 130, 17}, {190, 106, 130, 18}, {190, 106, 130, 19}, {190, 106, 130, 21}, {190, 106, 130, 23}, {190, 106, 130, 26}, {190, 106, 130, 36}, {190, 106, 130, 38}, {190, 106, 130, 45}}},
{Region: "Argentina", Group: "Premium TCP USA", IPs: []net.IP{{190, 106, 130, 16}, {190, 106, 130, 18}, {190, 106, 130, 20}, {190, 106, 130, 23}, {190, 106, 130, 26}, {190, 106, 130, 36}, {190, 106, 130, 38}, {190, 106, 130, 39}, {190, 106, 130, 41}, {190, 106, 130, 43}}},
{Region: "Armenia", Group: "Premium UDP Europe", IPs: []net.IP{{185, 253, 160, 131}, {185, 253, 160, 133}, {185, 253, 160, 136}, {185, 253, 160, 137}, {185, 253, 160, 138}, {185, 253, 160, 139}, {185, 253, 160, 140}, {185, 253, 160, 142}, {185, 253, 160, 143}, {185, 253, 160, 144}}},
{Region: "Australia", Group: "Premium TCP Asia", IPs: []net.IP{{43, 242, 68, 88}, {43, 242, 68, 99}, {202, 60, 91, 202}, {202, 60, 91, 209}, {202, 60, 91, 210}, {202, 60, 91, 214}, {202, 60, 91, 220}, {202, 60, 91, 230}, {202, 60, 91, 245}, {202, 60, 91, 254}}},
{Region: "Australia", Group: "Premium UDP Asia", IPs: []net.IP{{43, 242, 68, 75}, {43, 242, 68, 78}, {43, 242, 68, 87}, {43, 242, 68, 93}, {43, 242, 68, 102}, {202, 60, 80, 16}, {202, 60, 91, 197}, {202, 60, 91, 210}, {202, 60, 91, 234}, {202, 60, 91, 240}}},
{Region: "Austria", Group: "Premium TCP Europe", IPs: []net.IP{{37, 19, 223, 114}, {37, 19, 223, 119}, {37, 120, 155, 99}, {37, 120, 155, 101}, {89, 187, 168, 161}, {89, 187, 168, 169}, {89, 187, 168, 171}, {89, 187, 168, 174}, {89, 187, 168, 176}, {89, 187, 168, 178}}},
{Region: "Bahamas", Group: "Premium TCP USA", IPs: []net.IP{{95, 181, 238, 131}, {95, 181, 238, 132}, {95, 181, 238, 138}, {95, 181, 238, 139}, {95, 181, 238, 141}, {95, 181, 238, 145}, {95, 181, 238, 146}, {95, 181, 238, 147}, {95, 181, 238, 149}, {95, 181, 238, 150}}},
{Region: "Bangladesh", Group: "Premium UDP Asia", IPs: []net.IP{{84, 252, 93, 131}, {84, 252, 93, 133}, {84, 252, 93, 134}, {84, 252, 93, 135}, {84, 252, 93, 137}, {84, 252, 93, 139}, {84, 252, 93, 141}, {84, 252, 93, 142}, {84, 252, 93, 144}, {84, 252, 93, 145}}},
{Region: "Belarus", Group: "Premium UDP Europe", IPs: []net.IP{{45, 132, 194, 3}, {45, 132, 194, 10}, {45, 132, 194, 15}, {45, 132, 194, 25}, {45, 132, 194, 29}, {45, 132, 194, 37}, {45, 132, 194, 38}, {45, 132, 194, 39}, {45, 132, 194, 45}, {45, 132, 194, 49}}},
{Region: "Belarus", Group: "Premium TCP Europe", IPs: []net.IP{{45, 132, 194, 3}, {45, 132, 194, 6}, {45, 132, 194, 9}, {45, 132, 194, 14}, {45, 132, 194, 15}, {45, 132, 194, 22}, {45, 132, 194, 33}, {45, 132, 194, 35}, {45, 132, 194, 37}, {45, 132, 194, 49}}},
{Region: "Belgium", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 143, 53}, {37, 120, 143, 168}, {185, 210, 217, 10}, {185, 210, 217, 60}, {185, 210, 217, 253}, {193, 9, 114, 220}, {193, 9, 114, 222}, {193, 9, 114, 233}, {193, 9, 114, 245}, {194, 110, 115, 233}}},
{Region: "Belgium", Group: "Premium UDP Europe", IPs: []net.IP{{185, 210, 217, 54}, {185, 210, 217, 247}, {185, 210, 217, 250}, {185, 232, 21, 120}, {185, 232, 21, 122}, {193, 9, 114, 212}, {193, 9, 114, 213}, {194, 110, 115, 203}, {194, 110, 115, 213}, {194, 110, 115, 220}}},
{Region: "Bosnia and Herzegovina", Group: "Premium UDP Europe", IPs: []net.IP{{185, 99, 3, 57}, {185, 99, 3, 58}, {185, 99, 3, 72}, {185, 99, 3, 73}, {185, 99, 3, 74}, {185, 99, 3, 130}, {185, 99, 3, 131}, {185, 99, 3, 134}, {185, 99, 3, 135}, {185, 99, 3, 136}}},
{Region: "Brazil", Group: "Premium UDP USA", IPs: []net.IP{{188, 241, 177, 6}, {188, 241, 177, 14}, {188, 241, 177, 20}, {188, 241, 177, 21}, {188, 241, 177, 37}, {188, 241, 177, 43}, {188, 241, 177, 141}, {188, 241, 177, 148}, {188, 241, 177, 149}, {188, 241, 177, 150}}},
{Region: "Brazil", Group: "Premium TCP USA", IPs: []net.IP{{188, 241, 177, 4}, {188, 241, 177, 22}, {188, 241, 177, 23}, {188, 241, 177, 40}, {188, 241, 177, 44}, {188, 241, 177, 46}, {188, 241, 177, 131}, {188, 241, 177, 133}, {188, 241, 177, 149}, {188, 241, 177, 153}}},
{Region: "Bulgaria", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 152, 99}, {37, 120, 152, 100}, {37, 120, 152, 101}, {37, 120, 152, 102}, {37, 120, 152, 103}, {37, 120, 152, 104}, {37, 120, 152, 105}, {37, 120, 152, 106}, {37, 120, 152, 107}, {37, 120, 152, 109}}},
{Region: "Cambodia", Group: "Premium UDP Asia", IPs: []net.IP{{188, 215, 235, 37}, {188, 215, 235, 41}, {188, 215, 235, 43}, {188, 215, 235, 44}, {188, 215, 235, 48}, {188, 215, 235, 49}, {188, 215, 235, 52}, {188, 215, 235, 53}, {188, 215, 235, 56}, {188, 215, 235, 57}}},
{Region: "Cambodia", Group: "Premium TCP Asia", IPs: []net.IP{{188, 215, 235, 35}, {188, 215, 235, 36}, {188, 215, 235, 40}, {188, 215, 235, 43}, {188, 215, 235, 46}, {188, 215, 235, 47}, {188, 215, 235, 50}, {188, 215, 235, 51}, {188, 215, 235, 55}, {188, 215, 235, 57}}},
{Region: "Canada", Group: "Premium UDP USA", IPs: []net.IP{{66, 115, 142, 190}, {104, 200, 151, 28}, {104, 200, 151, 37}, {104, 200, 151, 48}, {104, 200, 151, 67}, {104, 200, 151, 72}, {104, 200, 151, 121}, {172, 98, 89, 145}, {172, 98, 89, 152}, {172, 98, 89, 169}}},
{Region: "Canada", Group: "Premium TCP USA", IPs: []net.IP{{104, 200, 151, 25}, {104, 200, 151, 33}, {104, 200, 151, 43}, {104, 200, 151, 90}, {104, 200, 151, 118}, {104, 200, 151, 125}, {104, 200, 151, 147}, {172, 98, 89, 147}, {172, 98, 89, 158}, {172, 98, 89, 190}}},
{Region: "Chile", Group: "Premium UDP USA", IPs: []net.IP{{146, 70, 11, 3}, {146, 70, 11, 4}, {146, 70, 11, 6}, {146, 70, 11, 7}, {146, 70, 11, 8}, {146, 70, 11, 9}, {146, 70, 11, 11}, {146, 70, 11, 12}, {146, 70, 11, 13}, {146, 70, 11, 14}}},
{Region: "Chile", Group: "Premium TCP USA", IPs: []net.IP{{146, 70, 11, 3}, {146, 70, 11, 4}, {146, 70, 11, 5}, {146, 70, 11, 6}, {146, 70, 11, 8}, {146, 70, 11, 9}, {146, 70, 11, 10}, {146, 70, 11, 11}, {146, 70, 11, 13}, {146, 70, 11, 14}}},
{Region: "China", Group: "Premium UDP Asia", IPs: []net.IP{{188, 241, 80, 131}, {188, 241, 80, 132}, {188, 241, 80, 133}, {188, 241, 80, 136}, {188, 241, 80, 137}, {188, 241, 80, 138}, {188, 241, 80, 139}, {188, 241, 80, 140}, {188, 241, 80, 141}, {188, 241, 80, 142}}},
{Region: "China", Group: "Premium TCP Asia", IPs: []net.IP{{188, 241, 80, 131}, {188, 241, 80, 133}, {188, 241, 80, 134}, {188, 241, 80, 135}, {188, 241, 80, 137}, {188, 241, 80, 138}, {188, 241, 80, 139}, {188, 241, 80, 140}, {188, 241, 80, 141}, {188, 241, 80, 142}}},
{Region: "Colombia", Group: "Premium UDP USA", IPs: []net.IP{{146, 70, 9, 3}, {146, 70, 9, 4}, {146, 70, 9, 5}, {146, 70, 9, 6}, {146, 70, 9, 7}, {146, 70, 9, 9}, {146, 70, 9, 10}, {146, 70, 9, 11}, {146, 70, 9, 12}, {146, 70, 9, 14}}},
{Region: "Costa Rica", Group: "Premium TCP USA", IPs: []net.IP{{146, 70, 10, 3}, {146, 70, 10, 4}, {146, 70, 10, 6}, {146, 70, 10, 7}, {146, 70, 10, 9}, {146, 70, 10, 10}, {146, 70, 10, 11}, {146, 70, 10, 12}, {146, 70, 10, 13}, {146, 70, 10, 14}}},
{Region: "Costa Rica", Group: "Premium UDP USA", IPs: []net.IP{{146, 70, 10, 3}, {146, 70, 10, 4}, {146, 70, 10, 6}, {146, 70, 10, 7}, {146, 70, 10, 8}, {146, 70, 10, 9}, {146, 70, 10, 10}, {146, 70, 10, 12}, {146, 70, 10, 13}, {146, 70, 10, 14}}},
{Region: "Croatia", Group: "Premium UDP Europe", IPs: []net.IP{{146, 70, 8, 3}, {146, 70, 8, 4}, {146, 70, 8, 5}, {146, 70, 8, 6}, {146, 70, 8, 7}, {146, 70, 8, 8}, {146, 70, 8, 9}, {146, 70, 8, 11}, {146, 70, 8, 12}, {146, 70, 8, 16}}},
{Region: "Croatia", Group: "Premium TCP Europe", IPs: []net.IP{{146, 70, 8, 3}, {146, 70, 8, 4}, {146, 70, 8, 6}, {146, 70, 8, 8}, {146, 70, 8, 10}, {146, 70, 8, 11}, {146, 70, 8, 12}, {146, 70, 8, 14}, {146, 70, 8, 15}, {146, 70, 8, 16}}},
{Region: "Cyprus", Group: "Premium TCP Europe", IPs: []net.IP{{185, 253, 162, 131}, {185, 253, 162, 133}, {185, 253, 162, 136}, {185, 253, 162, 137}, {185, 253, 162, 139}, {185, 253, 162, 140}, {185, 253, 162, 141}, {185, 253, 162, 142}, {185, 253, 162, 143}, {185, 253, 162, 144}}},
{Region: "Czech Republic", Group: "Premium UDP Europe", IPs: []net.IP{{195, 181, 161, 2}, {195, 181, 161, 3}, {195, 181, 161, 6}, {195, 181, 161, 12}, {195, 181, 161, 13}, {195, 181, 161, 17}, {195, 181, 161, 19}, {195, 181, 161, 21}, {195, 181, 161, 22}, {195, 181, 161, 23}}},
{Region: "Denmark", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 194, 37}, {37, 120, 194, 40}, {37, 120, 194, 41}, {37, 120, 194, 62}, {95, 174, 65, 174}, {185, 206, 224, 231}, {185, 206, 224, 235}, {185, 206, 224, 246}, {185, 206, 224, 247}, {185, 206, 224, 254}}},
{Region: "Denmark", Group: "Premium UDP Europe", IPs: []net.IP{{37, 120, 145, 93}, {37, 120, 145, 94}, {37, 120, 194, 40}, {37, 120, 194, 42}, {37, 120, 194, 43}, {37, 120, 194, 44}, {37, 120, 194, 53}, {37, 120, 194, 54}, {185, 206, 224, 232}, {185, 206, 224, 249}}},
{Region: "Egypt", Group: "Premium TCP Europe", IPs: []net.IP{{188, 214, 122, 47}, {188, 214, 122, 51}, {188, 214, 122, 55}, {188, 214, 122, 59}, {188, 214, 122, 60}, {188, 214, 122, 62}, {188, 214, 122, 67}, {188, 214, 122, 72}, {188, 214, 122, 73}, {188, 214, 122, 78}}},
{Region: "Egypt", Group: "Premium UDP Europe", IPs: []net.IP{{188, 214, 122, 36}, {188, 214, 122, 45}, {188, 214, 122, 53}, {188, 214, 122, 59}, {188, 214, 122, 61}, {188, 214, 122, 68}, {188, 214, 122, 72}, {188, 214, 122, 73}, {188, 214, 122, 74}, {188, 214, 122, 77}}},
{Region: "Estonia", Group: "Premium TCP Europe", IPs: []net.IP{{95, 153, 32, 83}, {95, 153, 32, 85}, {95, 153, 32, 86}, {95, 153, 32, 87}, {95, 153, 32, 89}, {95, 153, 32, 90}, {95, 153, 32, 91}, {95, 153, 32, 92}, {95, 153, 32, 93}, {95, 153, 32, 94}}},
{Region: "Estonia", Group: "Premium UDP Europe", IPs: []net.IP{{95, 153, 32, 83}, {95, 153, 32, 84}, {95, 153, 32, 87}, {95, 153, 32, 88}, {95, 153, 32, 89}, {95, 153, 32, 90}, {95, 153, 32, 91}, {95, 153, 32, 92}, {95, 153, 32, 93}, {95, 153, 32, 94}}},
{Region: "France", Group: "Premium UDP Europe", IPs: []net.IP{{84, 17, 60, 34}, {84, 17, 60, 41}, {84, 17, 60, 61}, {84, 17, 60, 115}, {84, 17, 60, 136}, {84, 17, 60, 167}, {92, 204, 174, 86}, {191, 101, 31, 84}, {191, 101, 31, 186}, {191, 101, 31, 249}}},
{Region: "France", Group: "Premium TCP Europe", IPs: []net.IP{{84, 17, 43, 167}, {84, 17, 60, 33}, {84, 17, 60, 58}, {84, 17, 60, 68}, {84, 17, 60, 92}, {84, 17, 60, 144}, {191, 101, 31, 170}, {191, 101, 31, 254}, {191, 101, 217, 176}, {191, 101, 217, 193}}},
{Region: "Georgia", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 236, 131}, {95, 181, 236, 133}, {95, 181, 236, 136}, {95, 181, 236, 137}, {95, 181, 236, 138}, {95, 181, 236, 139}, {95, 181, 236, 140}, {95, 181, 236, 142}, {95, 181, 236, 143}, {95, 181, 236, 144}}},
{Region: "Germany", Group: "Premium TCP Europe", IPs: []net.IP{{84, 17, 48, 35}, {84, 17, 48, 186}, {84, 17, 49, 43}, {84, 17, 49, 48}, {84, 17, 49, 52}, {84, 17, 49, 134}, {84, 17, 49, 231}, {84, 17, 49, 249}, {154, 13, 1, 159}, {154, 28, 188, 47}}},
{Region: "Germany", Group: "Premium UDP Europe", IPs: []net.IP{{84, 17, 48, 7}, {84, 17, 48, 9}, {84, 17, 48, 33}, {84, 17, 48, 143}, {84, 17, 49, 41}, {84, 17, 49, 184}, {138, 199, 36, 134}, {138, 199, 36, 200}, {154, 28, 188, 135}, {154, 28, 188, 162}}},
{Region: "Greece", Group: "Premium UDP Europe", IPs: []net.IP{{185, 51, 134, 163}, {185, 51, 134, 170}, {185, 51, 134, 171}, {185, 51, 134, 174}, {185, 51, 134, 243}, {185, 51, 134, 244}, {185, 51, 134, 247}, {185, 51, 134, 248}, {185, 51, 134, 249}, {185, 51, 134, 251}}},
{Region: "Greece", Group: "Premium TCP Europe", IPs: []net.IP{{185, 51, 134, 163}, {185, 51, 134, 166}, {185, 51, 134, 168}, {185, 51, 134, 170}, {185, 51, 134, 171}, {185, 51, 134, 174}, {185, 51, 134, 243}, {185, 51, 134, 245}, {185, 51, 134, 246}, {185, 51, 134, 252}}},
{Region: "Greenland", Group: "Premium TCP Europe", IPs: []net.IP{{91, 90, 120, 4}, {91, 90, 120, 5}, {91, 90, 120, 6}, {91, 90, 120, 7}, {91, 90, 120, 8}, {91, 90, 120, 10}, {91, 90, 120, 11}, {91, 90, 120, 15}, {91, 90, 120, 16}, {91, 90, 120, 17}}},
{Region: "Greenland", Group: "Premium UDP Europe", IPs: []net.IP{{91, 90, 120, 3}, {91, 90, 120, 7}, {91, 90, 120, 8}, {91, 90, 120, 10}, {91, 90, 120, 11}, {91, 90, 120, 12}, {91, 90, 120, 13}, {91, 90, 120, 15}, {91, 90, 120, 16}, {91, 90, 120, 17}}},
{Region: "Hong Kong", Group: "Premium UDP Asia", IPs: []net.IP{{84, 17, 56, 130}, {84, 17, 56, 134}, {84, 17, 56, 135}, {84, 17, 56, 151}, {84, 17, 56, 153}, {84, 17, 56, 162}, {84, 17, 56, 172}, {84, 17, 56, 175}, {84, 17, 56, 179}, {84, 17, 56, 180}}},
{Region: "Hong Kong", Group: "Premium TCP Asia", IPs: []net.IP{{84, 17, 56, 130}, {84, 17, 56, 132}, {84, 17, 56, 138}, {84, 17, 56, 142}, {84, 17, 56, 161}, {84, 17, 56, 166}, {84, 17, 56, 173}, {84, 17, 56, 175}, {84, 17, 56, 181}, {84, 17, 56, 184}}},
{Region: "Hungary", Group: "Premium TCP Europe", IPs: []net.IP{{86, 106, 74, 249}, {86, 106, 74, 250}, {86, 106, 74, 251}, {86, 106, 74, 252}, {86, 106, 74, 253}, {185, 189, 114, 115}, {185, 189, 114, 117}, {185, 189, 114, 121}, {185, 189, 114, 123}, {185, 189, 114, 124}}},
{Region: "Iceland", Group: "Premium UDP Europe", IPs: []net.IP{{45, 133, 193, 3}, {45, 133, 193, 4}, {45, 133, 193, 5}, {45, 133, 193, 7}, {45, 133, 193, 8}, {45, 133, 193, 9}, {45, 133, 193, 11}, {45, 133, 193, 12}, {45, 133, 193, 13}, {45, 133, 193, 14}}},
{Region: "India", Group: "Premium UDP Europe", IPs: []net.IP{{103, 13, 112, 50}, {103, 13, 112, 52}, {103, 13, 112, 54}, {103, 13, 112, 58}, {103, 13, 112, 68}, {103, 13, 112, 69}, {103, 13, 112, 70}, {103, 13, 112, 72}, {103, 13, 112, 74}, {103, 13, 112, 75}}},
{Region: "India", Group: "Premium TCP Europe", IPs: []net.IP{{103, 13, 112, 52}, {103, 13, 112, 54}, {103, 13, 112, 57}, {103, 13, 112, 59}, {103, 13, 112, 60}, {103, 13, 112, 62}, {103, 13, 112, 73}, {103, 13, 112, 77}, {103, 13, 112, 78}, {103, 13, 112, 79}}},
{Region: "Indonesia", Group: "Premium UDP Asia", IPs: []net.IP{{146, 70, 14, 3}, {146, 70, 14, 5}, {146, 70, 14, 6}, {146, 70, 14, 8}, {146, 70, 14, 9}, {146, 70, 14, 10}, {146, 70, 14, 12}, {146, 70, 14, 13}, {146, 70, 14, 14}, {146, 70, 14, 16}}},
{Region: "Indonesia", Group: "Premium TCP Asia", IPs: []net.IP{{146, 70, 14, 3}, {146, 70, 14, 5}, {146, 70, 14, 6}, {146, 70, 14, 7}, {146, 70, 14, 8}, {146, 70, 14, 9}, {146, 70, 14, 11}, {146, 70, 14, 12}, {146, 70, 14, 13}, {146, 70, 14, 16}}},
{Region: "Iran", Group: "Premium UDP Asia", IPs: []net.IP{{62, 133, 46, 4}, {62, 133, 46, 5}, {62, 133, 46, 6}, {62, 133, 46, 7}, {62, 133, 46, 10}, {62, 133, 46, 11}, {62, 133, 46, 12}, {62, 133, 46, 13}, {62, 133, 46, 14}, {62, 133, 46, 15}}},
{Region: "Iran", Group: "Premium TCP Asia", IPs: []net.IP{{62, 133, 46, 4}, {62, 133, 46, 5}, {62, 133, 46, 6}, {62, 133, 46, 8}, {62, 133, 46, 9}, {62, 133, 46, 10}, {62, 133, 46, 11}, {62, 133, 46, 12}, {62, 133, 46, 13}, {62, 133, 46, 14}}},
{Region: "Ireland", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 235, 147}, {37, 120, 235, 149}, {37, 120, 235, 158}, {37, 120, 235, 170}, {77, 81, 139, 41}, {77, 81, 139, 42}, {77, 81, 139, 45}, {84, 247, 48, 21}, {84, 247, 48, 27}, {84, 247, 48, 30}}},
{Region: "Ireland", Group: "Premium UDP Europe", IPs: []net.IP{{37, 120, 235, 149}, {37, 120, 235, 150}, {37, 120, 235, 155}, {37, 120, 235, 156}, {37, 120, 235, 157}, {37, 120, 235, 166}, {37, 120, 235, 168}, {37, 120, 235, 171}, {84, 247, 48, 4}, {84, 247, 48, 6}}},
{Region: "Isle of Man", Group: "Premium UDP Europe", IPs: []net.IP{{91, 90, 124, 147}, {91, 90, 124, 148}, {91, 90, 124, 149}, {91, 90, 124, 150}, {91, 90, 124, 152}, {91, 90, 124, 154}, {91, 90, 124, 156}, {91, 90, 124, 157}, {91, 90, 124, 158}, {91, 90, 124, 159}}},
{Region: "Isle of Man", Group: "Premium TCP Europe", IPs: []net.IP{{91, 90, 124, 148}, {91, 90, 124, 150}, {91, 90, 124, 151}, {91, 90, 124, 153}, {91, 90, 124, 154}, {91, 90, 124, 155}, {91, 90, 124, 156}, {91, 90, 124, 157}, {91, 90, 124, 158}, {91, 90, 124, 159}}},
{Region: "Israel", Group: "Premium TCP Europe", IPs: []net.IP{{160, 116, 0, 165}, {160, 116, 0, 170}, {185, 77, 248, 103}, {185, 77, 248, 108}, {185, 77, 248, 110}, {185, 77, 248, 112}, {185, 77, 248, 116}, {185, 77, 248, 123}, {185, 77, 248, 125}, {185, 77, 248, 129}}},
{Region: "Italy", Group: "Premium UDP Europe", IPs: []net.IP{{84, 17, 58, 100}, {84, 17, 58, 117}, {84, 17, 58, 119}, {87, 101, 94, 117}, {87, 101, 94, 124}, {185, 217, 71, 134}, {212, 102, 55, 108}, {212, 102, 55, 110}, {212, 102, 55, 113}, {212, 102, 55, 120}}},
{Region: "Italy", Group: "Premium TCP Europe", IPs: []net.IP{{84, 17, 58, 4}, {84, 17, 58, 14}, {84, 17, 58, 21}, {84, 17, 58, 101}, {84, 17, 58, 102}, {87, 101, 94, 75}, {212, 102, 55, 101}, {212, 102, 55, 102}, {212, 102, 55, 113}, {212, 102, 55, 120}}},
{Region: "Japan", Group: "Premium TCP Asia", IPs: []net.IP{{156, 146, 35, 7}, {156, 146, 35, 8}, {156, 146, 35, 11}, {156, 146, 35, 20}, {156, 146, 35, 22}, {156, 146, 35, 32}, {156, 146, 35, 33}, {156, 146, 35, 42}, {156, 146, 35, 43}, {156, 146, 35, 44}}},
{Region: "Kazakhstan", Group: "Premium UDP Europe", IPs: []net.IP{{62, 133, 47, 132}, {62, 133, 47, 133}, {62, 133, 47, 134}, {62, 133, 47, 136}, {62, 133, 47, 137}, {62, 133, 47, 139}, {62, 133, 47, 140}, {62, 133, 47, 141}, {62, 133, 47, 142}, {62, 133, 47, 143}}},
{Region: "Kazakhstan", Group: "Premium TCP Europe", IPs: []net.IP{{62, 133, 47, 131}, {62, 133, 47, 133}, {62, 133, 47, 134}, {62, 133, 47, 136}, {62, 133, 47, 137}, {62, 133, 47, 138}, {62, 133, 47, 139}, {62, 133, 47, 141}, {62, 133, 47, 143}, {62, 133, 47, 144}}},
{Region: "Kenya", Group: "Premium TCP Asia", IPs: []net.IP{{62, 12, 118, 195}, {62, 12, 118, 196}, {62, 12, 118, 197}, {62, 12, 118, 198}, {62, 12, 118, 199}, {62, 12, 118, 200}, {62, 12, 118, 201}, {62, 12, 118, 202}, {62, 12, 118, 203}, {62, 12, 118, 204}}},
{Region: "Kenya", Group: "Premium UDP Asia", IPs: []net.IP{{62, 12, 118, 195}, {62, 12, 118, 196}, {62, 12, 118, 197}, {62, 12, 118, 198}, {62, 12, 118, 199}, {62, 12, 118, 200}, {62, 12, 118, 201}, {62, 12, 118, 202}, {62, 12, 118, 203}, {62, 12, 118, 204}}},
{Region: "Korea", Group: "Premium UDP Asia", IPs: []net.IP{{79, 110, 55, 132}, {79, 110, 55, 136}, {79, 110, 55, 138}, {79, 110, 55, 141}, {79, 110, 55, 142}, {79, 110, 55, 149}, {79, 110, 55, 153}, {79, 110, 55, 154}, {79, 110, 55, 157}, {79, 110, 55, 158}}},
{Region: "Latvia", Group: "Premium UDP Europe", IPs: []net.IP{{109, 248, 148, 243}, {109, 248, 148, 244}, {109, 248, 148, 248}, {109, 248, 148, 249}, {109, 248, 148, 250}, {109, 248, 148, 252}, {109, 248, 149, 19}, {109, 248, 149, 20}, {109, 248, 149, 24}, {109, 248, 149, 29}}},
{Region: "Latvia", Group: "Premium TCP Europe", IPs: []net.IP{{109, 248, 148, 243}, {109, 248, 148, 245}, {109, 248, 148, 251}, {109, 248, 148, 252}, {109, 248, 149, 22}, {109, 248, 149, 23}, {109, 248, 149, 24}, {109, 248, 149, 26}, {109, 248, 149, 28}, {109, 248, 149, 29}}},
{Region: "Liechtenstein", Group: "Premium UDP Europe", IPs: []net.IP{{91, 90, 122, 131}, {91, 90, 122, 134}, {91, 90, 122, 135}, {91, 90, 122, 136}, {91, 90, 122, 137}, {91, 90, 122, 138}, {91, 90, 122, 141}, {91, 90, 122, 142}, {91, 90, 122, 143}, {91, 90, 122, 144}}},
{Region: "Lithuania", Group: "Premium UDP Europe", IPs: []net.IP{{85, 206, 162, 209}, {85, 206, 162, 211}, {85, 206, 162, 216}, {85, 206, 162, 217}, {85, 206, 162, 218}, {85, 206, 162, 220}, {85, 206, 165, 20}, {85, 206, 165, 23}, {85, 206, 165, 25}, {85, 206, 165, 30}}},
{Region: "Lithuania", Group: "Premium TCP Europe", IPs: []net.IP{{85, 206, 162, 211}, {85, 206, 162, 214}, {85, 206, 162, 215}, {85, 206, 162, 217}, {85, 206, 162, 221}, {85, 206, 162, 222}, {85, 206, 165, 20}, {85, 206, 165, 23}, {85, 206, 165, 24}, {85, 206, 165, 26}}},
{Region: "Luxembourg", Group: "Premium TCP Europe", IPs: []net.IP{{5, 253, 204, 6}, {5, 253, 204, 7}, {5, 253, 204, 13}, {5, 253, 204, 22}, {5, 253, 204, 26}, {5, 253, 204, 29}, {5, 253, 204, 39}, {5, 253, 204, 42}, {5, 253, 204, 43}, {5, 253, 204, 44}}},
{Region: "Luxembourg", Group: "Premium UDP Europe", IPs: []net.IP{{5, 253, 204, 3}, {5, 253, 204, 8}, {5, 253, 204, 10}, {5, 253, 204, 13}, {5, 253, 204, 14}, {5, 253, 204, 22}, {5, 253, 204, 25}, {5, 253, 204, 29}, {5, 253, 204, 36}, {5, 253, 204, 39}}},
{Region: "Macao", Group: "Premium UDP Asia", IPs: []net.IP{{84, 252, 92, 133}, {84, 252, 92, 135}, {84, 252, 92, 137}, {84, 252, 92, 138}, {84, 252, 92, 139}, {84, 252, 92, 140}, {84, 252, 92, 141}, {84, 252, 92, 142}, {84, 252, 92, 143}, {84, 252, 92, 144}}},
{Region: "Macao", Group: "Premium TCP Asia", IPs: []net.IP{{84, 252, 92, 132}, {84, 252, 92, 134}, {84, 252, 92, 137}, {84, 252, 92, 138}, {84, 252, 92, 139}, {84, 252, 92, 140}, {84, 252, 92, 141}, {84, 252, 92, 142}, {84, 252, 92, 143}, {84, 252, 92, 145}}},
{Region: "Macedonia", Group: "Premium UDP Europe", IPs: []net.IP{{185, 225, 28, 3}, {185, 225, 28, 4}, {185, 225, 28, 5}, {185, 225, 28, 6}, {185, 225, 28, 7}, {185, 225, 28, 8}, {185, 225, 28, 9}, {185, 225, 28, 10}, {185, 225, 28, 11}, {185, 225, 28, 12}}},
{Region: "Macedonia", Group: "Premium TCP Europe", IPs: []net.IP{{185, 225, 28, 3}, {185, 225, 28, 4}, {185, 225, 28, 5}, {185, 225, 28, 6}, {185, 225, 28, 7}, {185, 225, 28, 8}, {185, 225, 28, 9}, {185, 225, 28, 10}, {185, 225, 28, 11}, {185, 225, 28, 12}}},
{Region: "Malaysia", Group: "Premium TCP Asia", IPs: []net.IP{{146, 70, 15, 7}, {146, 70, 15, 8}, {146, 70, 15, 9}, {146, 70, 15, 10}, {146, 70, 15, 11}, {146, 70, 15, 12}, {146, 70, 15, 13}, {146, 70, 15, 14}, {146, 70, 15, 15}, {146, 70, 15, 16}}},
{Region: "Malaysia", Group: "Premium UDP Asia", IPs: []net.IP{{146, 70, 15, 4}, {146, 70, 15, 6}, {146, 70, 15, 7}, {146, 70, 15, 8}, {146, 70, 15, 9}, {146, 70, 15, 12}, {146, 70, 15, 13}, {146, 70, 15, 14}, {146, 70, 15, 15}, {146, 70, 15, 16}}},
{Region: "Malta", Group: "Premium TCP Europe", IPs: []net.IP{{176, 125, 230, 132}, {176, 125, 230, 135}, {176, 125, 230, 136}, {176, 125, 230, 137}, {176, 125, 230, 138}, {176, 125, 230, 139}, {176, 125, 230, 140}, {176, 125, 230, 141}, {176, 125, 230, 142}, {176, 125, 230, 143}}},
{Region: "Malta", Group: "Premium UDP Europe", IPs: []net.IP{{176, 125, 230, 131}, {176, 125, 230, 133}, {176, 125, 230, 134}, {176, 125, 230, 135}, {176, 125, 230, 137}, {176, 125, 230, 138}, {176, 125, 230, 139}, {176, 125, 230, 140}, {176, 125, 230, 141}, {176, 125, 230, 145}}},
{Region: "Mexico", Group: "Premium TCP USA", IPs: []net.IP{{77, 81, 142, 130}, {77, 81, 142, 131}, {77, 81, 142, 137}, {77, 81, 142, 139}, {77, 81, 142, 144}, {77, 81, 142, 149}, {77, 81, 142, 150}, {77, 81, 142, 154}, {77, 81, 142, 156}, {77, 81, 142, 157}}},
{Region: "Mexico", Group: "Premium UDP USA", IPs: []net.IP{{77, 81, 142, 130}, {77, 81, 142, 131}, {77, 81, 142, 135}, {77, 81, 142, 138}, {77, 81, 142, 139}, {77, 81, 142, 140}, {77, 81, 142, 144}, {77, 81, 142, 155}, {77, 81, 142, 156}, {77, 81, 142, 157}}},
{Region: "Moldova", Group: "Premium UDP Europe", IPs: []net.IP{{178, 175, 130, 243}, {178, 175, 130, 244}, {178, 175, 130, 245}, {178, 175, 130, 246}, {178, 175, 130, 250}, {178, 175, 130, 252}, {178, 175, 130, 253}, {178, 175, 130, 254}, {178, 175, 142, 133}, {178, 175, 142, 134}}},
{Region: "Moldova", Group: "Premium TCP Europe", IPs: []net.IP{{178, 175, 130, 243}, {178, 175, 130, 245}, {178, 175, 130, 246}, {178, 175, 130, 250}, {178, 175, 130, 251}, {178, 175, 130, 252}, {178, 175, 130, 254}, {178, 175, 142, 131}, {178, 175, 142, 132}, {178, 175, 142, 134}}},
{Region: "Monaco", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 233, 131}, {95, 181, 233, 132}, {95, 181, 233, 135}, {95, 181, 233, 136}, {95, 181, 233, 137}, {95, 181, 233, 139}, {95, 181, 233, 140}, {95, 181, 233, 141}, {95, 181, 233, 143}, {95, 181, 233, 144}}},
{Region: "Monaco", Group: "Premium TCP Europe", IPs: []net.IP{{95, 181, 233, 131}, {95, 181, 233, 132}, {95, 181, 233, 133}, {95, 181, 233, 136}, {95, 181, 233, 138}, {95, 181, 233, 139}, {95, 181, 233, 140}, {95, 181, 233, 141}, {95, 181, 233, 142}, {95, 181, 233, 144}}},
{Region: "Mongolia", Group: "Premium TCP Asia", IPs: []net.IP{{185, 253, 163, 131}, {185, 253, 163, 132}, {185, 253, 163, 134}, {185, 253, 163, 135}, {185, 253, 163, 137}, {185, 253, 163, 139}, {185, 253, 163, 141}, {185, 253, 163, 142}, {185, 253, 163, 144}, {185, 253, 163, 145}}},
{Region: "Mongolia", Group: "Premium UDP Asia", IPs: []net.IP{{185, 253, 163, 131}, {185, 253, 163, 132}, {185, 253, 163, 133}, {185, 253, 163, 134}, {185, 253, 163, 137}, {185, 253, 163, 138}, {185, 253, 163, 140}, {185, 253, 163, 142}, {185, 253, 163, 143}, {185, 253, 163, 145}}},
{Region: "Montenegro", Group: "Premium TCP Europe", IPs: []net.IP{{176, 125, 229, 131}, {176, 125, 229, 132}, {176, 125, 229, 133}, {176, 125, 229, 134}, {176, 125, 229, 135}, {176, 125, 229, 138}, {176, 125, 229, 139}, {176, 125, 229, 141}, {176, 125, 229, 142}, {176, 125, 229, 144}}},
{Region: "Morocco", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 232, 131}, {95, 181, 232, 132}, {95, 181, 232, 133}, {95, 181, 232, 135}, {95, 181, 232, 138}, {95, 181, 232, 139}, {95, 181, 232, 140}, {95, 181, 232, 141}, {95, 181, 232, 143}, {95, 181, 232, 144}}},
{Region: "Morocco", Group: "Premium TCP Europe", IPs: []net.IP{{95, 181, 232, 131}, {95, 181, 232, 132}, {95, 181, 232, 133}, {95, 181, 232, 134}, {95, 181, 232, 135}, {95, 181, 232, 136}, {95, 181, 232, 137}, {95, 181, 232, 138}, {95, 181, 232, 140}, {95, 181, 232, 142}}},
{Region: "Netherlands", Group: "Premium UDP Europe", IPs: []net.IP{{181, 214, 206, 16}, {181, 214, 206, 18}, {191, 96, 168, 19}, {191, 96, 168, 115}, {191, 96, 168, 128}, {195, 78, 54, 31}, {195, 78, 54, 123}, {195, 78, 54, 125}, {195, 78, 54, 131}, {195, 78, 54, 144}}},
{Region: "Netherlands", Group: "Premium TCP Europe", IPs: []net.IP{{191, 96, 168, 18}, {191, 96, 168, 40}, {191, 96, 168, 50}, {191, 96, 168, 112}, {191, 96, 168, 127}, {195, 78, 54, 8}, {195, 78, 54, 50}, {195, 78, 54, 118}, {195, 78, 54, 145}, {195, 181, 172, 78}}},
{Region: "New Zealand", Group: "Premium TCP Asia", IPs: []net.IP{{114, 141, 194, 2}, {114, 141, 194, 3}, {114, 141, 194, 5}, {114, 141, 194, 6}, {114, 141, 194, 7}, {114, 141, 194, 9}, {114, 141, 194, 10}, {114, 141, 194, 11}, {114, 141, 194, 13}, {114, 141, 194, 14}}},
{Region: "New Zealand", Group: "Premium UDP Asia", IPs: []net.IP{{114, 141, 194, 3}, {114, 141, 194, 4}, {114, 141, 194, 6}, {114, 141, 194, 7}, {114, 141, 194, 8}, {114, 141, 194, 9}, {114, 141, 194, 10}, {114, 141, 194, 11}, {114, 141, 194, 13}, {114, 141, 194, 14}}},
{Region: "Nigeria", Group: "Premium UDP Europe", IPs: []net.IP{{102, 165, 25, 68}, {102, 165, 25, 69}, {102, 165, 25, 70}, {102, 165, 25, 71}, {102, 165, 25, 72}, {102, 165, 25, 73}, {102, 165, 25, 74}, {102, 165, 25, 76}, {102, 165, 25, 77}, {102, 165, 25, 78}}},
{Region: "Nigeria", Group: "Premium TCP Europe", IPs: []net.IP{{102, 165, 25, 68}, {102, 165, 25, 70}, {102, 165, 25, 71}, {102, 165, 25, 72}, {102, 165, 25, 73}, {102, 165, 25, 74}, {102, 165, 25, 75}, {102, 165, 25, 76}, {102, 165, 25, 77}, {102, 165, 25, 78}}},
{Region: "Norway", Group: "Premium TCP Europe", IPs: []net.IP{{45, 12, 223, 131}, {45, 12, 223, 132}, {45, 12, 223, 134}, {45, 12, 223, 138}, {45, 12, 223, 141}, {82, 102, 27, 93}, {185, 206, 225, 235}, {185, 253, 97, 236}, {185, 253, 97, 245}, {185, 253, 97, 247}}},
{Region: "Norway", Group: "Premium UDP Europe", IPs: []net.IP{{45, 12, 223, 136}, {45, 12, 223, 141}, {82, 102, 27, 93}, {185, 206, 225, 28}, {185, 206, 225, 29}, {185, 206, 225, 231}, {185, 206, 225, 233}, {185, 253, 97, 245}, {185, 253, 97, 247}, {185, 253, 97, 249}}},
{Region: "Pakistan", Group: "Premium TCP Asia", IPs: []net.IP{{146, 70, 12, 3}, {146, 70, 12, 4}, {146, 70, 12, 5}, {146, 70, 12, 6}, {146, 70, 12, 7}, {146, 70, 12, 8}, {146, 70, 12, 9}, {146, 70, 12, 11}, {146, 70, 12, 12}, {146, 70, 12, 14}}},
{Region: "Pakistan", Group: "Premium UDP Asia", IPs: []net.IP{{146, 70, 12, 3}, {146, 70, 12, 4}, {146, 70, 12, 5}, {146, 70, 12, 7}, {146, 70, 12, 9}, {146, 70, 12, 10}, {146, 70, 12, 11}, {146, 70, 12, 12}, {146, 70, 12, 13}, {146, 70, 12, 14}}},
{Region: "Panama", Group: "Premium UDP Europe", IPs: []net.IP{{91, 90, 126, 131}, {91, 90, 126, 132}, {91, 90, 126, 133}, {91, 90, 126, 135}, {91, 90, 126, 137}, {91, 90, 126, 139}, {91, 90, 126, 140}, {91, 90, 126, 141}, {91, 90, 126, 143}, {91, 90, 126, 145}}},
{Region: "Panama", Group: "Premium TCP Europe", IPs: []net.IP{{91, 90, 126, 133}, {91, 90, 126, 134}, {91, 90, 126, 135}, {91, 90, 126, 137}, {91, 90, 126, 138}, {91, 90, 126, 139}, {91, 90, 126, 140}, {91, 90, 126, 141}, {91, 90, 126, 142}, {91, 90, 126, 145}}},
{Region: "Philippines", Group: "Premium TCP Asia", IPs: []net.IP{{188, 214, 125, 35}, {188, 214, 125, 36}, {188, 214, 125, 37}, {188, 214, 125, 38}, {188, 214, 125, 44}, {188, 214, 125, 52}, {188, 214, 125, 53}, {188, 214, 125, 54}, {188, 214, 125, 60}, {188, 214, 125, 62}}},
{Region: "Philippines", Group: "Premium UDP Asia", IPs: []net.IP{{188, 214, 125, 35}, {188, 214, 125, 37}, {188, 214, 125, 39}, {188, 214, 125, 41}, {188, 214, 125, 42}, {188, 214, 125, 43}, {188, 214, 125, 48}, {188, 214, 125, 52}, {188, 214, 125, 57}, {188, 214, 125, 62}}},
{Region: "Poland", Group: "Premium UDP Europe", IPs: []net.IP{{37, 120, 156, 5}, {37, 120, 156, 14}, {37, 120, 156, 18}, {37, 120, 156, 21}, {37, 120, 156, 23}, {37, 120, 156, 39}, {37, 120, 156, 40}, {51, 75, 56, 34}, {51, 75, 56, 37}, {51, 75, 56, 43}}},
{Region: "Poland", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 156, 9}, {37, 120, 156, 10}, {37, 120, 156, 12}, {37, 120, 156, 17}, {37, 120, 156, 20}, {37, 120, 156, 22}, {37, 120, 156, 39}, {51, 75, 56, 41}, {51, 75, 56, 43}, {51, 75, 56, 44}}},
{Region: "Portugal", Group: "Premium TCP Europe", IPs: []net.IP{{89, 26, 243, 2}, {89, 26, 243, 100}, {89, 26, 243, 197}, {89, 26, 243, 198}, {89, 26, 243, 216}, {89, 26, 243, 219}, {89, 26, 243, 222}, {89, 26, 243, 224}, {89, 26, 243, 226}, {89, 26, 243, 227}}},
{Region: "Qatar", Group: "Premium TCP Europe", IPs: []net.IP{{95, 181, 234, 131}, {95, 181, 234, 133}, {95, 181, 234, 134}, {95, 181, 234, 135}, {95, 181, 234, 136}, {95, 181, 234, 137}, {95, 181, 234, 138}, {95, 181, 234, 142}, {95, 181, 234, 143}, {95, 181, 234, 144}}},
{Region: "Qatar", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 234, 131}, {95, 181, 234, 132}, {95, 181, 234, 134}, {95, 181, 234, 135}, {95, 181, 234, 136}, {95, 181, 234, 138}, {95, 181, 234, 140}, {95, 181, 234, 142}, {95, 181, 234, 143}, {95, 181, 234, 144}}},
{Region: "Russian Federation", Group: "Premium UDP Europe", IPs: []net.IP{{5, 8, 16, 74}, {5, 8, 16, 88}, {5, 8, 16, 89}, {5, 8, 16, 90}, {5, 8, 16, 91}, {5, 8, 16, 94}, {5, 8, 16, 109}, {5, 8, 16, 124}, {5, 8, 16, 125}, {5, 8, 16, 131}}},
{Region: "Russian Federation", Group: "Premium TCP Europe", IPs: []net.IP{{5, 8, 16, 75}, {5, 8, 16, 87}, {5, 8, 16, 94}, {5, 8, 16, 116}, {5, 8, 16, 117}, {5, 8, 16, 118}, {5, 8, 16, 126}, {5, 8, 16, 133}, {5, 8, 16, 134}, {5, 8, 16, 142}}},
{Region: "Saudi Arabia", Group: "Premium TCP Europe", IPs: []net.IP{{95, 181, 235, 131}, {95, 181, 235, 132}, {95, 181, 235, 133}, {95, 181, 235, 134}, {95, 181, 235, 135}, {95, 181, 235, 136}, {95, 181, 235, 137}, {95, 181, 235, 138}, {95, 181, 235, 140}, {95, 181, 235, 141}}},
{Region: "Saudi Arabia", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 235, 131}, {95, 181, 235, 132}, {95, 181, 235, 133}, {95, 181, 235, 134}, {95, 181, 235, 137}, {95, 181, 235, 138}, {95, 181, 235, 139}, {95, 181, 235, 140}, {95, 181, 235, 141}, {95, 181, 235, 143}}},
{Region: "Serbia", Group: "Premium UDP Europe", IPs: []net.IP{{37, 120, 193, 180}, {37, 120, 193, 181}, {37, 120, 193, 183}, {37, 120, 193, 184}, {37, 120, 193, 185}, {37, 120, 193, 189}, {141, 98, 103, 35}, {141, 98, 103, 40}, {141, 98, 103, 43}, {141, 98, 103, 46}}},
{Region: "Singapore", Group: "Premium TCP Asia", IPs: []net.IP{{84, 17, 39, 162}, {84, 17, 39, 167}, {84, 17, 39, 170}, {84, 17, 39, 175}, {84, 17, 39, 176}, {84, 17, 39, 177}, {84, 17, 39, 179}, {84, 17, 39, 181}, {84, 17, 39, 183}, {84, 17, 39, 185}}},
{Region: "Singapore", Group: "Premium UDP Asia", IPs: []net.IP{{84, 17, 39, 162}, {84, 17, 39, 165}, {84, 17, 39, 166}, {84, 17, 39, 167}, {84, 17, 39, 168}, {84, 17, 39, 171}, {84, 17, 39, 172}, {84, 17, 39, 173}, {84, 17, 39, 175}, {84, 17, 39, 185}}},
{Region: "Slovakia", Group: "Premium TCP Europe", IPs: []net.IP{{185, 245, 85, 227}, {185, 245, 85, 228}, {185, 245, 85, 229}, {185, 245, 85, 230}, {185, 245, 85, 231}, {185, 245, 85, 232}, {185, 245, 85, 233}, {185, 245, 85, 234}, {185, 245, 85, 235}, {185, 245, 85, 236}}},
{Region: "Slovakia", Group: "Premium UDP Europe", IPs: []net.IP{{185, 245, 85, 227}, {185, 245, 85, 228}, {185, 245, 85, 229}, {185, 245, 85, 230}, {185, 245, 85, 231}, {185, 245, 85, 232}, {185, 245, 85, 233}, {185, 245, 85, 234}, {185, 245, 85, 235}, {185, 245, 85, 236}}},
{Region: "Slovenia", Group: "Premium TCP Europe", IPs: []net.IP{{195, 80, 150, 211}, {195, 80, 150, 212}, {195, 80, 150, 213}, {195, 80, 150, 214}, {195, 80, 150, 215}, {195, 80, 150, 216}, {195, 80, 150, 217}, {195, 80, 150, 219}, {195, 80, 150, 221}, {195, 80, 150, 222}}},
{Region: "Slovenia", Group: "Premium UDP Europe", IPs: []net.IP{{195, 80, 150, 211}, {195, 80, 150, 212}, {195, 80, 150, 213}, {195, 80, 150, 214}, {195, 80, 150, 217}, {195, 80, 150, 218}, {195, 80, 150, 219}, {195, 80, 150, 220}, {195, 80, 150, 221}, {195, 80, 150, 222}}},
{Region: "South Africa", Group: "Premium TCP Europe", IPs: []net.IP{{197, 85, 7, 26}, {197, 85, 7, 27}, {197, 85, 7, 28}, {197, 85, 7, 29}, {197, 85, 7, 30}, {197, 85, 7, 31}, {197, 85, 7, 131}, {197, 85, 7, 132}, {197, 85, 7, 133}, {197, 85, 7, 134}}},
{Region: "South Africa", Group: "Premium UDP Asia", IPs: []net.IP{{154, 127, 50, 212}, {154, 127, 50, 215}, {154, 127, 50, 218}, {154, 127, 50, 219}, {154, 127, 50, 222}, {154, 127, 60, 195}, {154, 127, 60, 198}, {154, 127, 60, 201}, {154, 127, 60, 204}, {154, 127, 60, 205}}},
{Region: "South Africa", Group: "Premium TCP Asia", IPs: []net.IP{{154, 127, 50, 212}, {154, 127, 50, 213}, {154, 127, 50, 216}, {154, 127, 50, 217}, {154, 127, 60, 195}, {154, 127, 60, 199}, {154, 127, 60, 201}, {154, 127, 60, 203}, {154, 127, 60, 205}, {154, 127, 60, 206}}},
{Region: "South Africa", Group: "Premium UDP Europe", IPs: []net.IP{{197, 85, 7, 26}, {197, 85, 7, 27}, {197, 85, 7, 28}, {197, 85, 7, 29}, {197, 85, 7, 30}, {197, 85, 7, 31}, {197, 85, 7, 131}, {197, 85, 7, 132}, {197, 85, 7, 133}, {197, 85, 7, 134}}},
{Region: "Spain", Group: "Premium TCP Europe", IPs: []net.IP{{37, 120, 142, 39}, {37, 120, 142, 42}, {37, 120, 142, 51}, {37, 120, 142, 56}, {37, 120, 142, 170}, {82, 102, 26, 211}, {82, 102, 26, 212}, {82, 102, 26, 213}, {82, 102, 26, 214}, {84, 17, 62, 138}}},
{Region: "Spain", Group: "Premium UDP Europe", IPs: []net.IP{{37, 120, 142, 44}, {37, 120, 142, 59}, {37, 120, 142, 60}, {45, 128, 39, 6}, {82, 102, 26, 195}, {82, 102, 26, 198}, {84, 17, 62, 131}, {84, 17, 62, 144}, {84, 17, 62, 152}, {185, 253, 99, 201}}},
{Region: "Sri Lanka", Group: "Premium UDP Europe", IPs: []net.IP{{95, 181, 239, 132}, {95, 181, 239, 133}, {95, 181, 239, 135}, {95, 181, 239, 136}, {95, 181, 239, 137}, {95, 181, 239, 138}, {95, 181, 239, 139}, {95, 181, 239, 141}, {95, 181, 239, 143}, {95, 181, 239, 144}}},
{Region: "Sri Lanka", Group: "Premium TCP Europe", IPs: []net.IP{{95, 181, 239, 131}, {95, 181, 239, 132}, {95, 181, 239, 133}, {95, 181, 239, 135}, {95, 181, 239, 138}, {95, 181, 239, 139}, {95, 181, 239, 140}, {95, 181, 239, 141}, {95, 181, 239, 142}, {95, 181, 239, 143}}},
{Region: "Sweden", Group: "Premium UDP Europe", IPs: []net.IP{{188, 126, 73, 206}, {188, 126, 73, 221}, {188, 126, 73, 222}, {188, 126, 79, 15}, {188, 126, 79, 16}, {188, 126, 79, 26}, {188, 126, 79, 30}, {195, 246, 120, 171}, {195, 246, 120, 175}, {195, 246, 120, 176}}},
{Region: "Sweden", Group: "Premium TCP Europe", IPs: []net.IP{{188, 126, 73, 197}, {188, 126, 73, 200}, {188, 126, 73, 203}, {188, 126, 79, 13}, {188, 126, 79, 14}, {188, 126, 79, 16}, {188, 126, 79, 24}, {188, 126, 79, 25}, {188, 126, 79, 28}, {195, 246, 120, 172}}},
{Region: "Switzerland", Group: "Premium TCP Europe", IPs: []net.IP{{84, 17, 52, 18}, {84, 17, 52, 19}, {84, 17, 52, 24}, {84, 17, 52, 39}, {84, 17, 52, 78}, {84, 17, 52, 82}, {185, 32, 222, 5}, {195, 225, 118, 36}, {195, 225, 118, 42}, {195, 225, 118, 60}}},
{Region: "Switzerland", Group: "Premium UDP Europe", IPs: []net.IP{{84, 17, 52, 14}, {84, 17, 52, 39}, {84, 17, 52, 42}, {84, 17, 52, 50}, {84, 17, 52, 55}, {84, 17, 52, 84}, {185, 32, 222, 17}, {185, 32, 222, 106}, {185, 189, 150, 53}, {195, 225, 118, 57}}},
{Region: "Taiwan", Group: "Premium UDP Asia", IPs: []net.IP{{45, 133, 181, 106}, {45, 133, 181, 107}, {45, 133, 181, 111}, {45, 133, 181, 112}, {45, 133, 181, 113}, {45, 133, 181, 116}, {45, 133, 181, 119}, {45, 133, 181, 120}, {45, 133, 181, 122}, {45, 133, 181, 126}}},
{Region: "Taiwan", Group: "Premium TCP Asia", IPs: []net.IP{{45, 133, 181, 99}, {45, 133, 181, 100}, {45, 133, 181, 105}, {45, 133, 181, 108}, {45, 133, 181, 113}, {45, 133, 181, 116}, {45, 133, 181, 119}, {45, 133, 181, 120}, {45, 133, 181, 121}, {45, 133, 181, 125}}},
{Region: "Thailand", Group: "Premium TCP Asia", IPs: []net.IP{{146, 70, 13, 3}, {146, 70, 13, 6}, {146, 70, 13, 7}, {146, 70, 13, 8}, {146, 70, 13, 9}, {146, 70, 13, 10}, {146, 70, 13, 12}, {146, 70, 13, 13}, {146, 70, 13, 14}, {146, 70, 13, 16}}},
{Region: "Turkey", Group: "Premium UDP Europe", IPs: []net.IP{{188, 213, 34, 5}, {188, 213, 34, 7}, {188, 213, 34, 10}, {188, 213, 34, 14}, {188, 213, 34, 15}, {188, 213, 34, 23}, {188, 213, 34, 26}, {188, 213, 34, 27}, {188, 213, 34, 104}, {188, 213, 34, 106}}},
{Region: "Ukraine", Group: "Premium UDP Europe", IPs: []net.IP{{31, 28, 163, 36}, {31, 28, 163, 50}, {31, 28, 163, 51}, {31, 28, 163, 59}, {62, 149, 7, 162}, {62, 149, 7, 163}, {62, 149, 29, 35}, {62, 149, 29, 37}, {62, 149, 29, 45}, {62, 149, 29, 55}}},
{Region: "United Arab Emirates", Group: "Premium TCP Europe", IPs: []net.IP{{217, 138, 193, 179}, {217, 138, 193, 180}, {217, 138, 193, 182}, {217, 138, 193, 183}, {217, 138, 193, 184}, {217, 138, 193, 185}, {217, 138, 193, 187}, {217, 138, 193, 188}, {217, 138, 193, 189}, {217, 138, 193, 190}}},
{Region: "United Arab Emirates", Group: "Premium UDP Europe", IPs: []net.IP{{217, 138, 193, 179}, {217, 138, 193, 180}, {217, 138, 193, 181}, {217, 138, 193, 182}, {217, 138, 193, 183}, {217, 138, 193, 184}, {217, 138, 193, 185}, {217, 138, 193, 186}, {217, 138, 193, 188}, {217, 138, 193, 189}}},
{Region: "United Kingdom", Group: "Premium UDP Europe", IPs: []net.IP{{45, 133, 172, 140}, {45, 133, 172, 157}, {95, 154, 200, 161}, {95, 154, 200, 166}, {95, 154, 200, 168}, {181, 215, 176, 138}, {181, 215, 176, 155}, {181, 215, 176, 243}, {191, 101, 209, 147}, {194, 110, 13, 103}}},
{Region: "United Kingdom", Group: "Premium TCP Europe", IPs: []net.IP{{45, 133, 172, 112}, {45, 133, 172, 113}, {45, 133, 172, 134}, {45, 133, 172, 140}, {45, 133, 173, 47}, {95, 154, 200, 173}, {181, 215, 176, 157}, {191, 101, 209, 70}, {191, 101, 209, 93}, {194, 110, 13, 119}}},
{Region: "United States", Group: "Premium TCP USA", IPs: []net.IP{{23, 82, 9, 164}, {23, 105, 161, 115}, {23, 105, 191, 51}, {45, 89, 173, 214}, {84, 17, 35, 55}, {84, 17, 40, 73}, {84, 17, 40, 99}, {156, 146, 37, 98}, {156, 146, 59, 66}, {212, 102, 41, 28}}},
{Region: "Venezuela", Group: "Premium UDP USA", IPs: []net.IP{{95, 181, 237, 131}, {95, 181, 237, 132}, {95, 181, 237, 133}, {95, 181, 237, 134}, {95, 181, 237, 135}, {95, 181, 237, 136}, {95, 181, 237, 137}, {95, 181, 237, 139}, {95, 181, 237, 140}, {95, 181, 237, 143}}},
{Region: "Venezuela", Group: "Premium TCP USA", IPs: []net.IP{{95, 181, 237, 132}, {95, 181, 237, 133}, {95, 181, 237, 134}, {95, 181, 237, 135}, {95, 181, 237, 136}, {95, 181, 237, 138}, {95, 181, 237, 139}, {95, 181, 237, 142}, {95, 181, 237, 143}, {95, 181, 237, 144}}},
{Region: "Vietnam", Group: "Premium UDP Asia", IPs: []net.IP{{188, 214, 152, 99}, {188, 214, 152, 100}, {188, 214, 152, 101}, {188, 214, 152, 102}, {188, 214, 152, 103}, {188, 214, 152, 104}, {188, 214, 152, 105}, {188, 214, 152, 107}, {188, 214, 152, 108}, {188, 214, 152, 110}}},
{Region: "Vietnam", Group: "Premium TCP Asia", IPs: []net.IP{{188, 214, 152, 99}, {188, 214, 152, 100}, {188, 214, 152, 101}, {188, 214, 152, 102}, {188, 214, 152, 103}, {188, 214, 152, 104}, {188, 214, 152, 106}, {188, 214, 152, 107}, {188, 214, 152, 108}, {188, 214, 152, 109}}},
}
}

View File

@@ -1,83 +0,0 @@
package constants
import (
"net"
"github.com/qdm12/private-internet-access-docker/internal/models"
)
const (
// Cloudflare is a DNS over TLS provider
Cloudflare models.DNSProvider = "cloudflare"
// Google is a DNS over TLS provider
Google models.DNSProvider = "google"
// Quad9 is a DNS over TLS provider
Quad9 models.DNSProvider = "quad9"
// Quadrant is a DNS over TLS provider
Quadrant models.DNSProvider = "quadrant"
// CleanBrowsing is a DNS over TLS provider
CleanBrowsing models.DNSProvider = "cleanbrowsing"
// SecureDNS is a DNS over TLS provider
SecureDNS models.DNSProvider = "securedns"
// LibreDNS is a DNS over TLS provider
LibreDNS models.DNSProvider = "libredns"
)
// DNSProviderMapping returns a constant mapping of dns provider name
// to their data such as IP addresses or TLS host name.
func DNSProviderMapping() map[models.DNSProvider]models.DNSProviderData {
return map[models.DNSProvider]models.DNSProviderData{
Cloudflare: models.DNSProviderData{
IPs: []net.IP{{1, 1, 1, 1}, {1, 0, 0, 1}},
SupportsTLS: true,
Host: models.DNSHost("cloudflare-dns.com"),
},
Google: models.DNSProviderData{
IPs: []net.IP{{8, 8, 8, 8}, {8, 8, 4, 4}},
SupportsTLS: true,
Host: models.DNSHost("dns.google"),
},
Quad9: models.DNSProviderData{
IPs: []net.IP{{9, 9, 9, 9}, {149, 112, 112, 112}},
SupportsTLS: true,
Host: models.DNSHost("dns.quad9.net"),
},
Quadrant: models.DNSProviderData{
IPs: []net.IP{{12, 159, 2, 159}},
SupportsTLS: true,
Host: models.DNSHost("dns-tls.qis.io"),
},
CleanBrowsing: models.DNSProviderData{
IPs: []net.IP{{185, 228, 168, 9}, {185, 228, 169, 9}},
SupportsTLS: true,
Host: models.DNSHost("security-filter-dns.cleanbrowsing.org"),
},
SecureDNS: models.DNSProviderData{
IPs: []net.IP{{146, 185, 167, 43}},
SupportsTLS: true,
Host: models.DNSHost("dot.securedns.eu"),
},
LibreDNS: models.DNSProviderData{
IPs: []net.IP{{116, 203, 115, 192}},
SupportsTLS: true,
Host: models.DNSHost("dot.libredns.gr"),
},
}
}
// Block lists URLs
const (
AdsBlockListHostnamesURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/ads-hostnames.updated"
AdsBlockListIPsURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/ads-ips.updated"
MaliciousBlockListHostnamesURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/malicious-hostnames.updated"
MaliciousBlockListIPsURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/malicious-ips.updated"
SurveillanceBlockListHostnamesURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/surveillance-hostnames.updated"
SurveillanceBlockListIPsURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/surveillance-ips.updated"
)
// DNS certificates to fetch
// TODO obtain from source directly, see qdm12/updated)
const (
NamedRootURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/named.root.updated"
RootKeyURL models.URL = "https://raw.githubusercontent.com/qdm12/files/master/root.key.updated"
)

View File

@@ -0,0 +1,121 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
FastestvpnCertificate = "MIIFQjCCAyqgAwIBAgIIUfxepT+rr8owDQYJKoZIhvcNAQEMBQAwPzELMAkGA1UEBhMCS1kxEzARBgNVBAoTCkZhc3Rlc3RWUE4xGzAZBgNVBAMTEkZhc3Rlc3RWUE4gUm9vdCBDQ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Y6HQKcyuAcWUqQnaIhoZ2JcAP7EKq7uCqsMhcYZD/j3O/3RPtSW5UOx6ItDU+Ua0t9Edho9whNw0VQXmo1JjYoP3FzPjuKoDWTSO1q5eYlZfwcTcs55O2shNkFafPg/6cCm5j6v9nyHrM3sk4LjkrBPUXVx2m/aoz219t8O9Ha9/CdMKXsPO/8gTUzpgnzSgPnGnBmi5xr1nspVN8X4E2f3D+DKqBim3YgslD68NcuFQvJ0/BxZzWVbrr+QXoyzaiCgXuogpIDc2bB6oRXqFnHNz36d4QJmJdWdSaijiS/peQ6EOPgOZ1GuObLWlDCBZLNeQ+N6QaiJxVO4XUj/s22i1IRtwdz84TRHrbWiIpEymsqmb/Ep5r4xV5d6+791axclfOTH7tQrY/SbPtTJI4OEgNekI8YfadQifpelF82MsFFEZuaQn0lj+fvLGtE/zKh3OdLTxRc5TAgBB+0T81+JQosygNr2aFFG0hxar1eyw/gLeG8H+7Ie50pyPvXO4OgB6Key8rSExpilQXlvAT1qX0qS3/K1i/9QkSE9ftIPT6vtwLV2sVQzfyanI4IZgWC6ryhvNLsRn0NFnQclor0+aq"
FastestvpnOpenvpnStaticKeyV1 = "697fe793b32cb5091d30f2326d5d124a9412e93d0a44ef7361395d76528fcbfc82c3859dccea70a93cfa8fae409709bff75f844cf5ff0c237f426d0c20969233db0e706edb6bdf195ec3dc11b3f76bc807a77e74662d9a800c8cd1144ebb67b7f0d3f1281d1baf522bfe03b7c3f963b1364fc0769400e413b61ca7b43ab19fac9e0f77e41efd4bda7fd77b1de2d7d7855cbbe3e620cecceac72c21a825b243e651f44d90e290e09c3ad650de8fca99c858bc7caad584bc69b11e5c9fd9381c69c505ec487a65912c672d83ed0113b5a74ddfbd3ab33b3683cec593557520a72c4d6cce46111f56f3396cc3ce7183edce553c68ea0796cf6c4375fad00aaa2a42"
)
func FastestvpnCountriesChoices() (choices []string) {
servers := FastestvpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Country
}
return choices
}
func FastestvpnHostnameChoices() (choices []string) {
servers := FastestvpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Hostname
}
return choices
}
// FastestvpnServers returns the list of all VPN servers for FastestVPN.
//nolint:lll
func FastestvpnServers() []models.FastestvpnServer {
return []models.FastestvpnServer{
{Country: "Australia", Hostname: "au-sd-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{139, 99, 149, 10}}},
{Country: "Australia", Hostname: "au-sd-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{139, 99, 149, 10}}},
{Country: "Australia", Hostname: "au2-sd-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{139, 99, 131, 126}}},
{Country: "Australia", Hostname: "au2-sd-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{139, 99, 131, 126}}},
{Country: "Austria", Hostname: "at.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{185, 210, 219, 86}}},
{Country: "Belgium", Hostname: "bel1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{217, 138, 211, 67}}},
{Country: "Belgium", Hostname: "bel2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{217, 138, 211, 68}}},
{Country: "Belgium", Hostname: "bel3.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{217, 138, 211, 69}}},
{Country: "Brazil", Hostname: "br-jp-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{45, 179, 88, 31}}},
{Country: "Brazil", Hostname: "br-jp-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{45, 179, 88, 31}}},
{Country: "Bulgaria", Hostname: "bg.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{37, 46, 114, 46}}},
{Country: "Canada", Hostname: "ca1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{192, 99, 103, 48}}},
{Country: "Canada", Hostname: "ca2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{192, 99, 103, 49}}},
{Country: "Czechia", Hostname: "cz-pr-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{185, 216, 35, 218}}},
{Country: "Czechia", Hostname: "cz-pr-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{185, 216, 35, 218}}},
{Country: "Denmark", Hostname: "dk.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{185, 245, 84, 70}}},
{Country: "Finland", Hostname: "fi-hs-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{194, 34, 132, 19}}},
{Country: "Finland", Hostname: "fi-hs-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{194, 34, 132, 19}}},
{Country: "France", Hostname: "fr-rb-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{37, 59, 172, 213}}},
{Country: "France", Hostname: "fr-rb-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{37, 59, 172, 213}}},
{Country: "Germany", Hostname: "de1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{83, 143, 245, 254}}},
{Country: "Hong.Kong", Hostname: "hk-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{64, 120, 88, 115}}},
{Country: "Hong.Kong", Hostname: "hk-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{64, 120, 88, 115}}},
{Country: "India", Hostname: "in41.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{101, 53, 128, 39}}},
{Country: "India", Hostname: "in45.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{101, 53, 128, 148}}},
{Country: "India", Hostname: "in50.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{103, 104, 74, 32}}},
{Country: "India-stream", Hostname: "in-stream.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{103, 104, 74, 30}}},
{Country: "Italy", Hostname: "it.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{37, 120, 207, 90}}},
{Country: "Japan", Hostname: "jp-tk-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{202, 239, 38, 147}}},
{Country: "Japan", Hostname: "jp-tk-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{202, 239, 38, 147}}},
{Country: "Luxembourg", Hostname: "lux1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{94, 242, 195, 147}}},
{Country: "Netherlands", Hostname: "nl.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{213, 5, 64, 22}}},
{Country: "Netherlands", Hostname: "nl2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{89, 46, 223, 251}}},
{Country: "Netherlands", Hostname: "nl3.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{89, 46, 223, 252}}},
{Country: "Norway", Hostname: "nr-ol-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{185, 90, 61, 20}}},
{Country: "Norway", Hostname: "nr-ol-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{185, 90, 61, 20}}},
{Country: "Poland", Hostname: "pl2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{194, 15, 196, 117}}},
{Country: "Portugal", Hostname: "pt.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{185, 90, 57, 146}}},
{Country: "Romania", Hostname: "ro.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{91, 199, 50, 131}}},
{Country: "Russia", Hostname: "russia.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{95, 213, 193, 52}}},
{Country: "Serbia", Hostname: "rs.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{37, 46, 115, 246}}},
{Country: "Singapore", Hostname: "sg-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{209, 58, 174, 195}}},
{Country: "Singapore", Hostname: "sg-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{209, 58, 174, 195}}},
{Country: "South.Korea", Hostname: "kr-so-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{103, 249, 31, 36}}},
{Country: "South.Korea", Hostname: "kr-so-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{103, 249, 31, 36}}},
{Country: "Spain", Hostname: "es-bl-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{193, 148, 19, 155}}},
{Country: "Spain", Hostname: "es-bl-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{193, 148, 19, 155}}},
{Country: "Sweden", Hostname: "se-st-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{128, 127, 104, 200}}},
{Country: "Sweden", Hostname: "se-st-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{128, 127, 104, 201}}},
{Country: "Sweden", Hostname: "se2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{79, 142, 76, 142}}},
{Country: "Switzerland", Hostname: "ch-zr-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{82, 102, 24, 254}}},
{Country: "Switzerland", Hostname: "ch-zr-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{82, 102, 24, 254}}},
{Country: "Turkey", Hostname: "tr-iz-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{185, 123, 102, 57}}},
{Country: "Turkey", Hostname: "tr.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{185, 123, 102, 57}}},
{Country: "UAE-Dubai", Hostname: "ue-db-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{45, 9, 249, 110}}},
{Country: "UAE-Dubai", Hostname: "ue-db-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{45, 9, 249, 110}}},
{Country: "UK", Hostname: "uk.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{5, 226, 139, 143}}},
{Country: "UK", Hostname: "uk6.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{5, 226, 139, 148}}},
{Country: "UK-Stream", Hostname: "uk-stream.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{195, 206, 169, 171}}},
{Country: "US-Atlanta", Hostname: "us-at-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{23, 82, 10, 205}}},
{Country: "US-Atlanta", Hostname: "us-at-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{23, 82, 10, 205}}},
{Country: "US-Charlotte", Hostname: "us-cf-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{192, 154, 253, 6}}},
{Country: "US-Charlotte", Hostname: "us-cf-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{192, 154, 253, 6}}},
{Country: "US-Chicago", Hostname: "us-ch1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{38, 98, 159, 11}}},
{Country: "US-Chicago", Hostname: "us-ch2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{38, 98, 159, 10}}},
{Country: "US-Dallas", Hostname: "us-dl-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{74, 63, 219, 202}}},
{Country: "US-Dallas", Hostname: "us-dl-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{74, 63, 219, 202}}},
{Country: "US-Denver", Hostname: "us-dv1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{173, 248, 157, 107}}},
{Country: "US-Los.Angeles", Hostname: "us-la-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{64, 31, 35, 222}}},
{Country: "US-Los.Angeles", Hostname: "us-la-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{64, 31, 35, 222}}},
{Country: "US-Miami", Hostname: "usmia.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{162, 255, 138, 226}}},
{Country: "US-Netflix", Hostname: "netflix.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{37, 59, 172, 215}}},
{Country: "US-New.York", Hostname: "us-ny-ovtcp-01.jumptoserver.com", UDP: false, TCP: true, IPs: []net.IP{{38, 132, 102, 107}}},
{Country: "US-New.York", Hostname: "us-ny-ovudp-01.jumptoserver.com", UDP: true, TCP: false, IPs: []net.IP{{38, 132, 102, 107}}},
{Country: "US-Phoenix", Hostname: "us-ph1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{23, 83, 184, 71}}},
{Country: "US-Phoenix", Hostname: "us-ph2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{23, 83, 184, 72}}},
{Country: "US-Seattle", Hostname: "us-se1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{23, 82, 33, 99}}},
{Country: "US-St.Louis", Hostname: "us-st1.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{148, 72, 173, 28}}},
{Country: "US-St.Louis", Hostname: "us-st3.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{148, 72, 173, 30}}},
{Country: "US-St.Louis", Hostname: "us-st4.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{148, 72, 173, 31}}},
{Country: "US-St.Louis", Hostname: "us-st5.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{148, 72, 173, 32}}},
{Country: "US-Washington", Hostname: "us-wt.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{23, 82, 15, 90}}},
{Country: "US-Washington", Hostname: "us-wt2.jumptoserver.com", UDP: true, TCP: true, IPs: []net.IP{{23, 82, 15, 91}}},
}
}

View File

@@ -0,0 +1,313 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
HideMyAssCA = "MIIGVjCCBD6gAwIBAgIJAOmTY3hf1Bb6MA0GC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5EnBqKSv9XJS5wEXhIJZOiWNrLktNEGl4boKXE7aNoRacreJhcE1UR6AOS7hPZ+6atwiePyF4mJUeb9HZtxa493wk9/Vv6BR9il++1Jz/QKX4oLef8hyBP4Rb60qgxirG7kBLR+j9zfhskCgYEAzA5y5xIeuIIU0H4XUDG9dcebxSSjbwsuYIgeLdb9pjMGQhsvjjyyoh8/nT20tLkJpkXN3FFCRjNnUWLRhWYrVkkh1wqWiYOPrwqh5MU4KN/sDWSPcznTY+drkTpMFoKzsvdrl2zf3VR3FneXKv742bkXj601Ykko+XWMHcLutisCgYBSq8IrsjzfaTQiTGI9a7WWsvzK92bq7Abnfq7swAXWcJd/bnjTQKLrrvt2bmwNvlWKAb3c69BFMn0X4t4PuN0iJQ39D6aQAEaM7HwWAmjf5TbodbmgbGxdsUB4xcCIQQ1mvTkigXWrCg0YAD2GZSoaslXAAVv6nR5qWEIa0Hx9GA=="
)
func HideMyAssCountryChoices() (choices []string) {
servers := HideMyAssServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Country
}
return makeUnique(choices)
}
func HideMyAssCityChoices() (choices []string) {
servers := HideMyAssServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].City
}
return makeUnique(choices)
}
func HideMyAssHostnameChoices() (choices []string) {
servers := HideMyAssServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Hostname
}
return makeUnique(choices)
}
//nolint:lll
// HideMyAssServers returns a slice of all the server information for HideMyAss.
func HideMyAssServers() []models.HideMyAssServer {
return []models.HideMyAssServer{
{Country: "Afghanistan", Region: "", City: "Kabul", Hostname: "af.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 236}, {5, 62, 63, 232}}},
{Country: "Aland Islands", Region: "", City: "Mariehamn", Hostname: "ax.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 248}, {5, 62, 63, 244}}},
{Country: "Albania", Region: "", City: "Tirana", Hostname: "al.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 240}, {5, 62, 63, 236}}},
{Country: "Algeria", Region: "", City: "Annaba", Hostname: "dz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 244}, {5, 62, 63, 240}}},
{Country: "American Samoa", Region: "", City: "Pago Pago", Hostname: "as.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 4}, {5, 62, 58, 4}}},
{Country: "Andorra", Region: "", City: "Andorrala Vella", Hostname: "ad.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 4}, {5, 62, 62, 4}}},
{Country: "Angola", Region: "", City: "Luanda", Hostname: "ao.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 8}, {5, 62, 62, 8}}},
{Country: "Anguilla", Region: "", City: "The Valley", Hostname: "ai.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 8}, {5, 62, 58, 8}}},
{Country: "Antiguaand Barbuda", Region: "", City: "Saint John's", Hostname: "ag.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 12}, {5, 62, 58, 12}}},
{Country: "Argentina", Region: "", City: "Buenos Aires", Hostname: "ar.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 16}, {5, 62, 58, 16}}},
{Country: "Armenia", Region: "", City: "Tsaghkadzor", Hostname: "am.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 12}, {5, 62, 62, 12}}},
{Country: "Aruba", Region: "", City: "Palm Beach", Hostname: "aw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 20}, {5, 62, 58, 20}}},
{Country: "Australia", Region: "New South Wales", City: "Sydney", Hostname: "au.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 23, 3}, {5, 62, 23, 18}}},
{Country: "Austria", Region: "Carinthia", City: "Klagenfurt", Hostname: "at.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 253, 207, 3}, {91, 132, 139, 115}, {94, 198, 41, 94}, {94, 198, 41, 110}, {185, 9, 19, 126}, {185, 183, 107, 163}, {185, 210, 219, 99}, {185, 244, 212, 35}, {185, 244, 212, 190}}},
{Country: "Azerbaijan", Region: "", City: "Qusar", Hostname: "az.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 16}, {5, 62, 62, 16}}},
{Country: "Bahamas", Region: "", City: "Freeport", Hostname: "bs.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 24}, {5, 62, 58, 24}}},
{Country: "Bahrain", Region: "", City: "Manama", Hostname: "bh.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 20}, {5, 62, 62, 20}}},
{Country: "Bangladesh", Region: "", City: "Dhaka", Hostname: "bd.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 24}, {5, 62, 62, 24}}},
{Country: "Barbados", Region: "", City: "Worthing", Hostname: "bb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 28}, {5, 62, 58, 28}}},
{Country: "Belarus", Region: "", City: "Minsk", Hostname: "by.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 28}, {5, 62, 62, 28}}},
{Country: "Belgium", Region: "", City: "Brussels", Hostname: "be.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 20, 24}, {5, 62, 20, 33}, {5, 62, 20, 34}, {5, 62, 20, 44}}},
{Country: "Belize", Region: "", City: "Belize City", Hostname: "bz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 32}, {5, 62, 58, 32}}},
{Country: "Benin", Region: "", City: "Cotonou", Hostname: "bj.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 32}, {5, 62, 62, 32}}},
{Country: "Bermuda", Region: "", City: "Hamilton", Hostname: "bm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 36}, {5, 62, 58, 36}}},
{Country: "Bhutan", Region: "", City: "Thimphu", Hostname: "bt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 36}, {5, 62, 62, 36}}},
{Country: "Bolivia", Region: "", City: "Santa Cruz", Hostname: "bo.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 40}, {5, 62, 58, 40}}},
{Country: "Bosnia", Region: "", City: "Sarajevo", Hostname: "ba.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 40}, {5, 62, 62, 40}}},
{Country: "Botswana", Region: "", City: "Gaborone", Hostname: "bw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 44}, {5, 62, 62, 44}}},
{Country: "Brazil", Region: "", City: "Joao Pessoa", Hostname: "br.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 51, 51}, {5, 62, 51, 81}, {5, 62, 51, 111}, {45, 231, 207, 31}, {181, 215, 238, 207}, {191, 96, 13, 175}}},
{Country: "British Virgin Islands", Region: "", City: "Tortola", Hostname: "vg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 44}, {5, 62, 58, 44}}},
{Country: "Brunei", Region: "", City: "Jerudong", Hostname: "bn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 48}, {5, 62, 62, 48}}},
{Country: "Bulgaria", Region: "", City: "Sofia", Hostname: "bg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 52}, {5, 62, 62, 52}}},
{Country: "Burkina Faso", Region: "", City: "Ouagadougou", Hostname: "bf.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 56}, {5, 62, 62, 56}}},
{Country: "Burundi", Region: "", City: "Bujumbura", Hostname: "bi.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 60}, {5, 62, 62, 60}}},
{Country: "Cambodia", Region: "", City: "Phnom Penh", Hostname: "kh.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 64}, {5, 62, 62, 64}}},
{Country: "Cameroon", Region: "", City: "Yaounde", Hostname: "cm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 68}, {5, 62, 62, 68}}},
{Country: "Canada", Region: "British Columbia", City: "Vancouver", Hostname: "ca.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{51, 161, 54, 15}, {51, 161, 66, 111}, {54, 39, 219, 127}, {144, 217, 105, 207}, {158, 69, 234, 207}, {192, 99, 89, 207}, {192, 99, 110, 159}, {198, 27, 103, 191}}},
{Country: "Cape Verde", Region: "", City: "Cidade Velha", Hostname: "cv.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 72}, {5, 62, 62, 72}}},
{Country: "Cayman Islands", Region: "", City: "Spot Bay", Hostname: "ky.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 48}, {5, 62, 58, 48}}},
{Country: "Central African Republic", Region: "", City: "Bangassou", Hostname: "cf.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 76}, {5, 62, 62, 76}}},
{Country: "Chad", Region: "", City: "N'Djamena", Hostname: "td.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 80}, {5, 62, 62, 80}}},
{Country: "Chile", Region: "", City: "Santiago", Hostname: "cl.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 52}, {5, 62, 58, 52}}},
{Country: "China", Region: "Sichuan Sheng", City: "Chengdu", Hostname: "cn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 34, 40}, {5, 62, 34, 44}}},
{Country: "Christmas Island", Region: "", City: "Flying Fish Cove", Hostname: "cx.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 88}, {5, 62, 62, 84}}},
{Country: "Cocos Islands", Region: "", City: "West Island", Hostname: "cc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 92}, {5, 62, 62, 88}}},
{Country: "Colombia", Region: "", City: "San Andres", Hostname: "co.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 60}, {5, 62, 58, 56}}},
{Country: "Comoros", Region: "", City: "Ouani", Hostname: "km.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 96}, {5, 62, 62, 92}}},
{Country: "Congo", Region: "", City: "Kinshasa", Hostname: "cd.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 100}, {5, 62, 62, 96}}},
{Country: "Cook Islands", Region: "", City: "Avarua", Hostname: "ck.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 64}, {5, 62, 58, 60}}},
{Country: "Costa Rica", Region: "", City: "San Jose", Hostname: "cr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 68}, {5, 62, 58, 64}}},
{Country: "Coted`Ivoire", Region: "", City: "Yamoussoukro", Hostname: "ci.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 104}, {5, 62, 62, 100}}},
{Country: "Croatia", Region: "", City: "Zagreb", Hostname: "hr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 228}, {5, 62, 63, 224}}},
{Country: "Cuba", Region: "", City: "Havana", Hostname: "cu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 72}, {5, 62, 58, 68}}},
{Country: "Cyprus", Region: "", City: "Limassol", Hostname: "cy.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 108}, {5, 62, 62, 104}}},
{Country: "Czech Republic", Region: "", City: "Prague", Hostname: "cz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 246, 210, 130}, {185, 246, 210, 146}, {185, 246, 210, 162}, {185, 246, 210, 178}, {185, 246, 210, 194}, {212, 102, 38, 173}, {212, 102, 38, 186}}},
{Country: "Denmark", Region: "", City: "Copenhagen", Hostname: "dk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{2, 58, 46, 195}, {2, 58, 46, 211}, {37, 120, 232, 110}, {37, 120, 232, 126}, {37, 120, 232, 142}, {185, 212, 169, 174}, {185, 212, 169, 206}, {185, 212, 169, 222}}},
{Country: "Dominica", Region: "", City: "Marigot", Hostname: "dm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 76}, {5, 62, 58, 72}}},
{Country: "Dominican Republic", Region: "", City: "Punta Cana", Hostname: "do.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 80}, {5, 62, 58, 76}}},
{Country: "Ecuador", Region: "", City: "Quito", Hostname: "ec.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 84}, {5, 62, 58, 80}}},
{Country: "Egypt", Region: "", City: "Cairo", Hostname: "eg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 112}, {5, 62, 62, 108}}},
{Country: "El Salvador", Region: "", City: "San Miguel", Hostname: "sv.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 88}, {5, 62, 58, 84}}},
{Country: "Equatorial Guinea", Region: "", City: "Malabo", Hostname: "gq.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 116}, {5, 62, 62, 112}}},
{Country: "Eritrea", Region: "", City: "Asmara", Hostname: "er.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 120}, {5, 62, 62, 116}}},
{Country: "Estonia", Region: "", City: "Tallinn", Hostname: "ee.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 124}, {5, 62, 62, 120}}},
{Country: "Ethiopia", Region: "", City: "Gondar", Hostname: "et.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 128}, {5, 62, 62, 124}}},
{Country: "Falkland Islands", Region: "", City: "Stanley", Hostname: "fk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 92}, {5, 62, 58, 88}}},
{Country: "Faroe Islands", Region: "", City: "Torshavn", Hostname: "fo.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 132}, {5, 62, 62, 128}}},
{Country: "Fiji", Region: "", City: "Nadi", Hostname: "fj.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 96}, {5, 62, 58, 92}}},
{Country: "Finland", Region: "", City: "Helsinki", Hostname: "fi.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 77, 217, 16}, {185, 77, 217, 31}, {185, 77, 217, 46}, {185, 77, 217, 76}, {185, 77, 217, 91}, {185, 77, 217, 106}}},
{Country: "France", Region: "", City: "Paris", Hostname: "fr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{84, 17, 43, 90}, {84, 17, 43, 116}, {185, 93, 2, 50}, {185, 93, 2, 66}, {185, 93, 2, 82}, {185, 93, 2, 98}, {195, 154, 48, 59}, {212, 83, 153, 211}, {212, 83, 164, 190}, {212, 83, 188, 191}, {212, 129, 37, 90}, {212, 129, 55, 206}}},
{Country: "Gabon", Region: "", City: "Libreville", Hostname: "ga.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 136}, {5, 62, 62, 132}}},
{Country: "Gambia", Region: "", City: "Serekunda", Hostname: "gm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 140}, {5, 62, 62, 136}}},
{Country: "Georgia", Region: "", City: "Tbilisi", Hostname: "ge.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 144}, {5, 62, 62, 140}}},
{Country: "Germany", Region: "Hesse", City: "Frankfurt", Hostname: "de.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 41, 121}, {5, 62, 41, 133}, {5, 62, 41, 145}, {5, 62, 41, 157}, {5, 62, 41, 169}, {5, 62, 41, 181}}},
{Country: "Ghana", Region: "", City: "Accra", Hostname: "gh.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 148}, {5, 62, 62, 144}}},
{Country: "Gibraltar", Region: "", City: "Catalan", Hostname: "gi.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 152}, {5, 62, 62, 148}}},
{Country: "Greece", Region: "", City: "Patras", Hostname: "gr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 156}, {5, 62, 62, 152}}},
{Country: "Greenland", Region: "", City: "Ilulissat", Hostname: "gl.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 160}, {5, 62, 62, 156}}},
{Country: "Grenada", Region: "", City: "Saint George", Hostname: "gd.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 100}, {5, 62, 58, 96}}},
{Country: "Guadeloupe", Region: "", City: "Le Gosier", Hostname: "gp.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 104}, {5, 62, 58, 100}}},
{Country: "Guam", Region: "", City: "Tamuning", Hostname: "gu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 108}, {5, 62, 60, 164}}},
{Country: "Guatemala", Region: "", City: "Guatemala City", Hostname: "gt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 112}, {5, 62, 58, 104}}},
{Country: "Guinea-Bissau", Region: "", City: "Bissau", Hostname: "gw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 168}, {5, 62, 62, 160}}},
{Country: "Guinea", Region: "", City: "Conakry", Hostname: "gn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 172}, {5, 62, 62, 164}}},
{Country: "Guyana", Region: "", City: "Barima-Waini", Hostname: "gy.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 116}, {5, 62, 58, 108}}},
{Country: "Haiti", Region: "", City: "Cap-Haitien", Hostname: "ht.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 120}, {5, 62, 58, 112}}},
{Country: "Honduras", Region: "", City: "Tegucigalpa", Hostname: "hn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 124}, {5, 62, 58, 116}}},
{Country: "Hungary", Region: "", City: "Budapest", Hostname: "hu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{37, 120, 144, 78}, {37, 120, 144, 94}, {185, 94, 190, 174}, {185, 128, 26, 113}, {185, 128, 26, 126}, {185, 252, 223, 62}, {185, 252, 223, 78}}},
{Country: "Iceland", Region: "", City: "Reykjavik", Hostname: "is.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{82, 221, 112, 243}, {82, 221, 112, 244}}},
{Country: "India", Region: "Maharashtra", City: "Mumbai", Hostname: "in.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 34, 8}, {5, 62, 34, 12}}},
{Country: "Indonesia", Region: "", City: "Jakarta", Hostname: "id.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 34, 16}, {5, 62, 34, 20}}},
{Country: "Iran", Region: "", City: "Isfahan", Hostname: "ir.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 176}, {5, 62, 62, 168}}},
{Country: "Iraq", Region: "", City: "Baghdad", Hostname: "iq.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 180}, {5, 62, 62, 172}}},
{Country: "Ireland", Region: "", City: "Dublin", Hostname: "ie.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{78, 153, 199, 5}, {78, 153, 199, 29}, {78, 153, 199, 243}, {78, 153, 199, 254}}},
{Country: "Israel", Region: "", City: "Petah Tikva", Hostname: "il.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 185, 132, 62}, {185, 185, 132, 110}, {185, 185, 133, 190}}},
{Country: "Italy", Region: "Pordenone", City: "Porcia", Hostname: "it.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{45, 87, 184, 15}, {45, 87, 184, 47}, {84, 17, 58, 168}, {84, 17, 58, 213}, {84, 17, 59, 45}, {84, 17, 59, 59}}},
{Country: "Jamaica", Region: "", City: "Montego Bay", Hostname: "jm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 128}, {5, 62, 58, 120}}},
{Country: "Japan", Region: "", City: "Tokyo", Hostname: "jp.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{156, 146, 35, 162}, {156, 146, 35, 184}, {156, 146, 35, 185}, {212, 102, 51, 235}}},
{Country: "Jordan", Region: "", City: "Amman", Hostname: "jo.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 188}, {5, 62, 62, 180}}},
{Country: "Kazakhstan", Region: "", City: "Shymkent", Hostname: "kz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 192}, {5, 62, 62, 184}}},
{Country: "Kenya", Region: "", City: "Nairobi", Hostname: "ke.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 196}, {5, 62, 62, 188}}},
{Country: "Kiribati", Region: "", City: "Umwa Village", Hostname: "ki.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 132}, {5, 62, 58, 124}}},
{Country: "Kuwait", Region: "", City: "Kuwait City", Hostname: "kw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 200}, {5, 62, 62, 192}}},
{Country: "Kyrgyzstan", Region: "", City: "Bishkek", Hostname: "kg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 204}, {5, 62, 62, 196}}},
{Country: "Laos", Region: "", City: "Thakhek", Hostname: "la.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 208}, {5, 62, 62, 200}}},
{Country: "Latvia", Region: "", City: "Riga", Hostname: "lv.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 212}, {5, 62, 62, 204}}},
{Country: "Lebanon", Region: "", City: "Beirut", Hostname: "lb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 216}, {5, 62, 62, 208}}},
{Country: "Lesotho", Region: "", City: "Peka", Hostname: "ls.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 220}, {5, 62, 62, 212}}},
{Country: "Liberia", Region: "", City: "Monrovia", Hostname: "lr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 224}, {5, 62, 62, 216}}},
{Country: "Libya", Region: "", City: "Ghadames", Hostname: "ly.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 228}, {5, 62, 62, 220}}},
{Country: "Liechtenstein", Region: "", City: "Vaduz", Hostname: "li.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 232}, {5, 62, 62, 224}}},
{Country: "Lithuania", Region: "", City: "Siauliai", Hostname: "lt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 236}, {5, 62, 62, 228}}},
{Country: "Luxembourg", Region: "", City: "", Hostname: "lu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{92, 38, 162, 123}, {92, 38, 162, 148}, {92, 38, 162, 151}, {92, 38, 172, 25}, {92, 223, 88, 149}}},
{Country: "Macau", Region: "", City: "Macau", Hostname: "mo.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 240}, {5, 62, 62, 232}}},
{Country: "Macedonia", Region: "", City: "Skopje", Hostname: "mk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 244}, {5, 62, 62, 236}}},
{Country: "Madagascar", Region: "", City: "Antsiranana", Hostname: "mg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 248}, {5, 62, 62, 240}}},
{Country: "Malawi", Region: "", City: "Lilongwe", Hostname: "mw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 60, 252}, {5, 62, 62, 244}}},
{Country: "Malaysia", Region: "", City: "Kuala Lumpur", Hostname: "my.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 54, 231, 26}, {185, 54, 231, 43}, {185, 54, 231, 60}}},
{Country: "Maldives", Region: "", City: "Male", Hostname: "mv.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 0}, {5, 62, 62, 248}}},
{Country: "Mali", Region: "", City: "Bamako", Hostname: "ml.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 4}, {5, 62, 62, 252}}},
{Country: "Malta", Region: "", City: "Cospicua", Hostname: "mt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 8}, {5, 62, 63, 0}}},
{Country: "Mauritius", Region: "", City: "Port Louis", Hostname: "mu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 16}, {5, 62, 63, 8}}},
{Country: "Mexico", Region: "Sinaloa", City: "Mazatlan", Hostname: "mx.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{31, 14, 72, 16}, {31, 14, 72, 23}, {31, 14, 72, 30}, {31, 14, 72, 44}, {31, 14, 72, 51}}},
{Country: "Moldova", Region: "", City: "Chisinau", Hostname: "md.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 20}, {5, 62, 63, 12}}},
{Country: "Monaco", Region: "", City: "Monaco", Hostname: "mc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 24}, {5, 62, 63, 16}}},
{Country: "Mongolia", Region: "", City: "Suhbaatar", Hostname: "mn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 28}, {5, 62, 63, 20}}},
{Country: "Montenegro", Region: "", City: "Becici", Hostname: "me.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 32}, {5, 62, 63, 24}}},
{Country: "Montserrat", Region: "", City: "Plymouth", Hostname: "ms.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 136}, {5, 62, 58, 128}}},
{Country: "Morocco", Region: "", City: "Fes", Hostname: "ma.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 36}, {5, 62, 63, 28}}},
{Country: "Mozambique", Region: "", City: "Pemba", Hostname: "mz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 40}, {5, 62, 63, 32}}},
{Country: "Myanmar", Region: "", City: "Yangon", Hostname: "mm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 44}, {5, 62, 63, 36}}},
{Country: "Namibia", Region: "", City: "Windhoek", Hostname: "na.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 48}, {5, 62, 63, 40}}},
{Country: "Nauru", Region: "", City: "Anabar", Hostname: "nr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 140}, {5, 62, 58, 132}}},
{Country: "Nepal", Region: "", City: "Janakpur", Hostname: "np.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 52}, {5, 62, 63, 44}}},
{Country: "Netherlands", Region: "", City: "Amsterdam", Hostname: "nl.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{84, 17, 46, 134}, {84, 17, 46, 158}, {84, 17, 46, 182}, {84, 17, 46, 206}, {84, 17, 46, 251}}},
{Country: "New Caledonia", Region: "", City: "Noumea", Hostname: "nc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 144}, {5, 62, 58, 136}}},
{Country: "New Zealand", Region: "", City: "Auckland", Hostname: "nz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{103, 76, 164, 3}, {103, 76, 164, 19}, {103, 108, 94, 243}, {103, 231, 91, 131}}},
{Country: "Nicaragua", Region: "", City: "Managua", Hostname: "ni.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 148}, {5, 62, 58, 140}}},
{Country: "Niger", Region: "", City: "Niamey", Hostname: "ne.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 56}, {5, 62, 63, 48}}},
{Country: "Nigeria", Region: "", City: "Lagos", Hostname: "ng.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 60}, {5, 62, 63, 52}}},
{Country: "Niue", Region: "", City: "Alofi", Hostname: "nu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 152}, {5, 62, 58, 144}}},
{Country: "Norfolk Island", Region: "", City: "Kingston", Hostname: "nf.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 156}, {5, 62, 58, 148}}},
{Country: "North Korea", Region: "", City: "Manpo", Hostname: "kp.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 160}, {5, 62, 61, 64}}},
{Country: "Norway", Region: "", City: "Oslo", Hostname: "no.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 101, 32, 16}, {185, 101, 32, 48}, {185, 101, 32, 174}, {217, 170, 202, 112}, {217, 170, 204, 160}, {217, 170, 204, 223}, {217, 170, 206, 127}}},
{Country: "Oman", Region: "", City: "Salalah", Hostname: "om.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 68}, {5, 62, 63, 56}}},
{Country: "Pakistan", Region: "", City: "Karachi", Hostname: "pk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 72}, {5, 62, 63, 60}}},
{Country: "Palau", Region: "", City: "Melekeok", Hostname: "pw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 164}, {5, 62, 61, 76}}},
{Country: "Palestine", Region: "", City: "Bethlehem", Hostname: "ps.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 80}, {5, 62, 63, 64}}},
{Country: "Panama", Region: "", City: "Panama City", Hostname: "pa.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 168}, {5, 62, 58, 152}}},
{Country: "Papua New Guinea", Region: "", City: "Alotau", Hostname: "pg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 172}, {5, 62, 61, 84}}},
{Country: "Paraguay", Region: "", City: "Boqueron", Hostname: "py.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 176}, {5, 62, 58, 156}}},
{Country: "Peru", Region: "", City: "Cusco", Hostname: "pe.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 180}, {5, 62, 58, 160}}},
{Country: "Philippines", Region: "", City: "Baguio", Hostname: "ph.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 184}, {5, 62, 61, 88}}},
{Country: "Pitcairn Islands", Region: "", City: "Adamstown", Hostname: "pn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 188}, {5, 62, 58, 164}}},
{Country: "Poland", Region: "", City: "Warsaw", Hostname: "pl.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{84, 17, 55, 13}, {84, 17, 55, 26}, {185, 246, 208, 34}, {185, 246, 208, 61}, {185, 246, 208, 130}, {185, 246, 208, 157}}},
{Country: "Portugal", Region: "", City: "Leiria", Hostname: "pt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{91, 205, 230, 239}, {91, 205, 230, 255}, {91, 250, 240, 113}, {91, 250, 240, 193}, {91, 250, 240, 209}, {91, 250, 240, 225}, {195, 158, 248, 46}, {195, 158, 248, 94}}},
{Country: "Puerto Rico", Region: "", City: "San Juan", Hostname: "pr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 192}, {5, 62, 58, 168}}},
{Country: "Qatar", Region: "", City: "Doha", Hostname: "qa.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 92}, {5, 62, 63, 68}}},
{Country: "Republicof Djibouti", Region: "", City: "Djibouti", Hostname: "dj.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 96}, {5, 62, 63, 72}}},
{Country: "Republicof Singapore", Region: "", City: "Singapore", Hostname: "sg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 35, 135}, {5, 62, 35, 143}, {5, 62, 35, 159}, {5, 62, 35, 167}, {5, 62, 35, 175}, {92, 223, 85, 21}, {92, 223, 85, 22}}},
{Country: "Republicofthe Congo", Region: "", City: "Brazzaville", Hostname: "cg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 100}, {5, 62, 63, 76}}},
{Country: "Romania", Region: "", City: "Bucharest", Hostname: "ro.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 104}, {5, 62, 63, 80}}},
{Country: "Russia", Region: "", City: "Moscow", Hostname: "ru.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 19, 39}, {5, 62, 19, 47}, {5, 62, 19, 55}, {5, 62, 19, 63}}},
{Country: "Rwanda", Region: "", City: "Kigali", Hostname: "rw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 108}, {5, 62, 63, 84}}},
{Country: "Saint Helena", Region: "", City: "Tristan Da Cunha", Hostname: "sh.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 112}, {5, 62, 63, 88}}},
{Country: "Saint Kittsand Nevis", Region: "", City: "Basseterre", Hostname: "kn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 196}, {5, 62, 58, 172}}},
{Country: "Saint Lucia", Region: "", City: "Gros Islet", Hostname: "lc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 200}, {5, 62, 58, 176}}},
{Country: "Saint Pierreand Miquelon", Region: "", City: "Saint-Pierre", Hostname: "pm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 58, 180}, {5, 62, 63, 92}}},
{Country: "Saint Vincentandthe Grenadines", Region: "", City: "Kingstown", Hostname: "vc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 204}, {5, 62, 58, 184}}},
{Country: "Samoa", Region: "", City: "Matatufu", Hostname: "ws.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 208}, {5, 62, 58, 188}}},
{Country: "San Marino", Region: "", City: "San Marino", Hostname: "sm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 116}, {5, 62, 63, 96}}},
{Country: "Sao Tomeand Principe", Region: "", City: "Sao Tome", Hostname: "st.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 120}, {5, 62, 63, 100}}},
{Country: "Saudi Arabia", Region: "", City: "Riyadh", Hostname: "sa.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 124}, {5, 62, 63, 104}}},
{Country: "Senegal", Region: "", City: "Dakar", Hostname: "sn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 128}, {5, 62, 63, 108}}},
{Country: "Serbia", Region: "", City: "Belgrade", Hostname: "rs.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 132}, {5, 62, 63, 112}}},
{Country: "Slovakia", Region: "", City: "Bratislava", Hostname: "sk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 140}, {5, 62, 63, 120}}},
{Country: "Slovenia", Region: "", City: "Vrhnika", Hostname: "si.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 144}, {5, 62, 63, 124}}},
{Country: "Solomon Islands", Region: "", City: "Honiara", Hostname: "sb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 212}, {5, 62, 58, 192}}},
{Country: "Somalia", Region: "", City: "Afgooye", Hostname: "so.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 148}, {5, 62, 63, 128}}},
{Country: "South Africa", Region: "", City: "Johannesburg", Hostname: "za.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{102, 165, 47, 160}, {102, 165, 47, 176}, {154, 70, 155, 144}}},
{Country: "South Korea", Region: "", City: "Seoul", Hostname: "kr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{185, 54, 229, 25}, {185, 54, 229, 41}, {185, 54, 229, 57}, {185, 54, 229, 73}}},
{Country: "Spain", Region: "", City: "Alicante", Hostname: "es.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{82, 102, 17, 254}, {89, 38, 226, 238}, {217, 138, 218, 238}}},
{Country: "Sri Lanka", Region: "", City: "Moratuwa", Hostname: "lk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 152}, {5, 62, 63, 132}}},
{Country: "Sudan", Region: "", City: "Khartoum", Hostname: "sd.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 156}, {5, 62, 63, 136}}},
{Country: "Suriname", Region: "", City: "Paramaribo", Hostname: "sr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 216}, {5, 62, 58, 196}}},
{Country: "Svalbardand Jan Mayen", Region: "", City: "Longyearbyen", Hostname: "sj.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 160}, {5, 62, 63, 140}}},
{Country: "Swaziland", Region: "", City: "Manzini", Hostname: "sz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 220}, {5, 62, 58, 200}}},
{Country: "Sweden", Region: "Stockholm", City: "Nacka", Hostname: "se.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{31, 3, 152, 98}, {31, 3, 152, 106}, {37, 46, 121, 240}, {128, 127, 105, 164}, {128, 127, 105, 192}}},
{Country: "Switzerland", Region: "", City: "Zurich", Hostname: "ch.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{84, 17, 52, 141}, {84, 17, 52, 167}, {84, 17, 52, 180}, {84, 17, 52, 240}, {89, 187, 165, 179}}},
{Country: "Syria", Region: "", City: "Ad Darah", Hostname: "sy.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 164}, {5, 62, 63, 144}}},
{Country: "Taiwan", Region: "", City: "Taipei", Hostname: "tw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{172, 107, 246, 62}, {172, 107, 246, 110}, {172, 107, 246, 142}, {172, 107, 246, 174}, {172, 107, 246, 190}, {172, 107, 246, 206}, {172, 107, 246, 222}}},
{Country: "Tajikistan", Region: "", City: "Dushanbe", Hostname: "tj.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 168}, {5, 62, 63, 148}}},
{Country: "Tanzania", Region: "", City: "Arusha", Hostname: "tz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 172}, {5, 62, 63, 152}}},
{Country: "Thailand", Region: "", City: "Bangkok", Hostname: "th.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 176}, {5, 62, 63, 156}}},
{Country: "Togo", Region: "", City: "Lome", Hostname: "tg.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 180}, {5, 62, 63, 160}}},
{Country: "Tokelau", Region: "", City: "Atafu", Hostname: "tk.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 224}, {5, 62, 58, 204}}},
{Country: "Tonga", Region: "", City: "Nukualofa", Hostname: "to.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 228}, {5, 62, 58, 208}}},
{Country: "Trinidadand Tobago", Region: "", City: "San Fernando", Hostname: "tt.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 232}, {5, 62, 58, 212}}},
{Country: "Tunisia", Region: "", City: "Mahdia", Hostname: "tn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 184}, {5, 62, 63, 164}}},
{Country: "Turkey", Region: "", City: "Istanbul", Hostname: "tr.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{92, 38, 180, 76}, {92, 38, 180, 86}}},
{Country: "Turkmenistan", Region: "", City: "Ashgabat", Hostname: "tm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 188}, {5, 62, 63, 168}}},
{Country: "Turksand Caicos Islands", Region: "", City: "Balfour Town", Hostname: "tc.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 236}, {5, 62, 58, 216}}},
{Country: "Tuvalu", Region: "", City: "Vaitupu", Hostname: "tv.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 240}, {5, 62, 58, 220}}},
{Country: "UK", Region: "", City: "London", Hostname: "london.gb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 43, 193}, {5, 62, 43, 202}, {5, 62, 43, 218}, {77, 234, 43, 130}, {77, 234, 43, 166}, {77, 234, 43, 175}, {77, 234, 43, 185}}},
{Country: "UK", Region: "Scotland", City: "Glasgow", Hostname: "scotland.gb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{62, 128, 217, 69}, {62, 128, 217, 85}, {62, 128, 217, 112}, {80, 75, 64, 66}, {109, 169, 34, 23}, {109, 169, 34, 42}, {109, 169, 34, 62}}},
{Country: "UK", Region: "", City: "", Hostname: "gb.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{62, 128, 207, 110}, {62, 128, 217, 69}, {62, 128, 217, 85}, {62, 128, 217, 112}, {80, 75, 64, 66}, {109, 169, 34, 23}, {109, 169, 34, 42}, {109, 169, 34, 62}}},
{Country: "USA", Region: "Alabama", City: "Montgomery", Hostname: "al.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{95, 142, 127, 16}, {95, 142, 127, 25}}},
{Country: "USA", Region: "Alaska", City: "Anchorage", Hostname: "ak.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 252}, {5, 62, 58, 232}}},
{Country: "USA", Region: "Arizona", City: "Phoenix", Hostname: "az.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{23, 83, 130, 34}, {23, 83, 130, 37}, {23, 83, 130, 187}, {23, 83, 131, 98}, {23, 83, 131, 215}, {23, 83, 132, 155}, {23, 83, 132, 176}, {23, 83, 185, 50}}},
{Country: "USA", Region: "Arkansas", City: "Magnolia", Hostname: "ar.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 0}, {5, 62, 58, 236}}},
{Country: "USA", Region: "California", City: "Los Angeles", Hostname: "ca.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{67, 201, 33, 54}, {162, 253, 68, 145}, {162, 253, 68, 161}, {162, 253, 68, 177}, {162, 253, 68, 225}, {192, 252, 220, 60}}},
{Country: "USA", Region: "Connecticut", City: "Trumbull", Hostname: "ct.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 16, 16}, {5, 62, 16, 25}}},
{Country: "USA", Region: "Delaware", City: "Wilmington", Hostname: "de.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 4}, {5, 62, 58, 240}}},
{Country: "USA", Region: "Florida", City: "Miami", Hostname: "fl.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{171, 22, 76, 15}, {171, 22, 76, 31}, {171, 22, 76, 47}, {171, 22, 76, 79}, {171, 22, 76, 95}}},
{Country: "USA", Region: "Georgia", City: "Atlanta", Hostname: "ga.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 24, 15}, {5, 62, 24, 31}, {5, 62, 24, 61}, {66, 115, 181, 97}}},
{Country: "USA", Region: "Hawaii", City: "Honolulu", Hostname: "hi.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{131, 100, 2, 51}, {131, 100, 2, 99}}},
{Country: "USA", Region: "Idaho", City: "Idaho Falls", Hostname: "id.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 12}, {5, 62, 58, 248}}},
{Country: "USA", Region: "Illinois", City: "Chicago", Hostname: "il.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{154, 16, 241, 127}, {154, 16, 241, 255}, {181, 214, 61, 64}, {181, 214, 98, 31}, {181, 214, 99, 159}, {181, 214, 102, 159}, {181, 214, 107, 47}, {191, 101, 170, 30}}},
{Country: "USA", Region: "Indiana", City: "South Bend", Hostname: "in.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{198, 134, 108, 67}, {198, 134, 109, 131}}},
{Country: "USA", Region: "Iowa", City: "Des Moines", Hostname: "ia.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 104}, {5, 62, 59, 84}}},
{Country: "USA", Region: "Kansas", City: "Wichita", Hostname: "ks.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 16}, {5, 62, 58, 252}}},
{Country: "USA", Region: "Kentucky", City: "Louisville", Hostname: "ky.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 20}, {5, 62, 59, 0}}},
{Country: "USA", Region: "Louisiana", City: "New Orleans", Hostname: "la.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 24}, {5, 62, 59, 4}}},
{Country: "USA", Region: "Maine", City: "Bath", Hostname: "me.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 28}, {5, 62, 59, 8}}},
{Country: "USA", Region: "Maryland", City: "Baltimore", Hostname: "md.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 32}, {5, 62, 59, 12}}},
{Country: "USA", Region: "Massachusetts", City: "Boston", Hostname: "ma.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{38, 146, 55, 115}, {38, 146, 57, 253}, {38, 242, 7, 243}, {154, 3, 129, 29}, {154, 3, 129, 77}, {154, 3, 129, 93}}},
{Country: "USA", Region: "Michigan", City: "Lansing", Hostname: "mi.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 36}, {5, 62, 59, 16}}},
{Country: "USA", Region: "Minnesota", City: "Saint Paul", Hostname: "mn.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 108}, {5, 62, 59, 88}}},
{Country: "USA", Region: "Mississippi", City: "Louisville", Hostname: "ms.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 40}, {5, 62, 59, 20}}},
{Country: "USA", Region: "Missouri", City: "Kansas City", Hostname: "mo.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{209, 239, 115, 164}, {209, 239, 115, 186}}},
{Country: "USA", Region: "Montana", City: "Billings", Hostname: "mt.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 116}, {5, 62, 59, 92}}},
{Country: "USA", Region: "Nebraska", City: "Omaha", Hostname: "ne.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 44}, {5, 62, 59, 24}}},
{Country: "USA", Region: "Nevada", City: "Las Vegas", Hostname: "nv.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{76, 164, 192, 254}, {76, 164, 193, 82}, {76, 164, 200, 114}, {76, 164, 202, 190}, {76, 164, 205, 194}}},
{Country: "USA", Region: "New Hampshire", City: "Bedford", Hostname: "nh.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 48}, {5, 62, 59, 28}}},
{Country: "USA", Region: "New York", City: "Manhattan", Hostname: "ny.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{156, 146, 36, 77}, {156, 146, 36, 90}, {156, 146, 36, 103}, {195, 181, 168, 187}, {212, 102, 33, 77}, {212, 102, 33, 90}, {212, 102, 33, 144}, {212, 102, 33, 192}, {212, 102, 33, 224}, {212, 102, 33, 240}}},
{Country: "USA", Region: "North Carolina", City: "Asheville", Hostname: "nc.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{104, 247, 208, 78}, {104, 247, 208, 94}, {104, 247, 208, 110}, {104, 247, 208, 126}, {104, 247, 208, 142}, {104, 247, 208, 158}, {104, 247, 208, 174}}},
{Country: "USA", Region: "North Dakota", City: "Grand Forks", Hostname: "nd.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 60}, {5, 62, 59, 40}}},
{Country: "USA", Region: "Ohio", City: "Columbus", Hostname: "oh.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{199, 114, 218, 99}, {199, 114, 218, 115}}},
{Country: "USA", Region: "Oklahoma", City: "Oklahoma City", Hostname: "ok.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{216, 107, 129, 115}, {216, 107, 129, 131}}},
{Country: "USA", Region: "Pennsylvania", City: "Wilkes-Barre", Hostname: "pa.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 64}, {5, 62, 59, 44}}},
{Country: "USA", Region: "Rhode Island", City: "Providence", Hostname: "ri.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 68}, {5, 62, 59, 48}}},
{Country: "USA", Region: "South Carolina", City: "Columbia", Hostname: "sc.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 72}, {5, 62, 59, 52}}},
{Country: "USA", Region: "South Dakota", City: "Sioux Falls", Hostname: "sd.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 76}, {5, 62, 59, 56}}},
{Country: "USA", Region: "Tennessee", City: "Nashville", Hostname: "tn.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 80}, {5, 62, 59, 60}}},
{Country: "USA", Region: "Texas", City: "Dallas", Hostname: "tx.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{89, 187, 164, 86}, {89, 187, 164, 144}, {89, 187, 164, 160}, {89, 187, 164, 176}, {156, 146, 38, 141}, {212, 102, 40, 13}, {212, 102, 40, 141}, {212, 102, 40, 154}}},
{Country: "USA", Region: "Utah", City: "Salt Lake City", Hostname: "ut.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{69, 36, 169, 129}, {199, 189, 106, 235}, {199, 189, 106, 239}, {199, 189, 106, 245}, {199, 189, 106, 251}, {209, 95, 34, 73}}},
{Country: "USA", Region: "Vermont", City: "Rutland", Hostname: "vt.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 84}, {5, 62, 59, 64}}},
{Country: "USA", Region: "Virginia", City: "Ashburn", Hostname: "va.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{198, 98, 183, 37}, {198, 98, 183, 133}, {198, 98, 183, 152}}},
{Country: "USA", Region: "Washington", City: "Seattle", Hostname: "wa.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{66, 115, 149, 49}, {172, 98, 86, 150}, {172, 98, 86, 166}, {172, 98, 86, 182}, {199, 187, 211, 46}, {199, 187, 211, 92}, {199, 187, 211, 172}, {199, 187, 211, 187}, {199, 187, 211, 202}, {199, 187, 211, 232}, {199, 187, 211, 247}}},
{Country: "USA", Region: "West Virginia", City: "Philippi", Hostname: "wv.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 88}, {5, 62, 59, 68}}},
{Country: "USA", Region: "Wisconsin", City: "Madison", Hostname: "wi.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{204, 15, 110, 131}, {204, 15, 110, 163}}},
{Country: "USA", Region: "Wyoming", City: "Cheyenne", Hostname: "wy.us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 92}, {5, 62, 59, 72}}},
{Country: "USA", Region: "", City: "", Hostname: "us.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 84}, {5, 62, 59, 64}}},
{Country: "Uganda", Region: "", City: "Kampala", Hostname: "ug.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 192}, {5, 62, 63, 172}}},
{Country: "Ukraine", Region: "", City: "Odessa", Hostname: "ua.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{31, 28, 162, 3}, {31, 28, 162, 35}, {62, 149, 29, 158}, {62, 149, 29, 190}}},
{Country: "United Arab Emirates", Region: "", City: "Dubai", Hostname: "ae.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 200}, {5, 62, 63, 188}}},
{Country: "Uruguay", Region: "", City: "Montevideo", Hostname: "uy.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 56, 244}, {5, 62, 58, 224}}},
{Country: "Uzbekistan", Region: "", City: "Samarkand", Hostname: "uz.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 204}, {5, 62, 63, 192}}},
{Country: "Vanuatu", Region: "", City: "Loltong", Hostname: "vu.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 96}, {5, 62, 59, 76}}},
{Country: "Vatican", Region: "", City: "Vatican City", Hostname: "va.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 208}, {5, 62, 63, 196}}},
{Country: "Venezuela", Region: "", City: "Caracas", Hostname: "ve.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 57, 100}, {5, 62, 59, 80}}},
{Country: "Vietnam", Region: "", City: "Ho Chi Minh City", Hostname: "vn.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 212}, {5, 62, 63, 200}}},
{Country: "Yemen", Region: "", City: "Sanaa", Hostname: "ye.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 216}, {5, 62, 63, 204}}},
{Country: "Zambia", Region: "", City: "Lusaka", Hostname: "zm.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 220}, {5, 62, 63, 208}}},
{Country: "Zimbabwe", Region: "", City: "Harare", Hostname: "zw.hma.rocks", TCP: true, UDP: true, IPs: []net.IP{{5, 62, 61, 224}, {5, 62, 63, 212}}},
}
}

View File

@@ -0,0 +1,126 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
MullvadCertificate = "MIIGIzCCBAugAwIBAgIJAK6BqXN9GHI0MA0GCSqGSIb3DQEBCwUAMIGfMQswCQYDVQQGEwJTRTERMA8GA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Y3Pahnj1yfG75Yw82spZanUH0QSNoMVMWnmV2hXGsWqypRq0pH8mPeLzeKa82gzsAZsouRD1k8wFlYA4z9HQFxqfcntTqXuwQcQIDAQABo2AwXjAdBgNVHQ4EFgQUfaEyaBpGNzsqttiSMETq+X/GJ0YwHwYDVR0jBBgwFoAUfaEyaBpGNzsqttiSMETq+X/GJ0YwCwYDVR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBADH5izxu4V8Javal8EA4DxZxIHUsWCg5cuopB28PsyJYpyKipsBoI8+RXqbtrLLue4WQfNPZHLXlKi+A3GTrLdlnenYzXVipPd+n3vRZyofaB3Jtb03nirVWGa8FG21Xy/f4rPqwcW54lxrnnh0SA0hwuZ+b2yAWESBXPxrzVQdTWCqoFI6/aRnN8RyZn0LqRYoW7WDtKpLmfyvshBmmu4PCYSh/SYiFHgR9fsWzVcxdySDsmX8wXowuFfp8V9sFhD4TsebAaplaICOuLUgj+Yin5QzgB0F9Ci3Zh6oWwl64SL/OxxQLpzMWzr0lrWsQrS3PgC4+6JC4IpTXX5eUqfSvHPtbRKK0yLnd9hYgvZUBvvZvUFR/3/fW+mpBHbZJBu9+/1uux46M4rJ2FeaJUf9PhYCPuUj63yu0Grn0DreVKK1SkD5V6qXN0TmoxYyguhfsIPCpI1VsdaSWuNjJ+a/HIlKIU8vKp5iN/+6ZTPAg9Q7s3Ji+vfx/AhFtQyTpIYNszVzNZyobvkiMUlK+eUKGlHVQp73y6MmGIlbBbyzpEoedNU4uFu57mw4fYGHqYZmYqFaiNQv4tVrGkg6p+Ypyu1zOfIHF7eqlAOu/SyRTvZkt9VtSVEOVH7nDIGdrCC9U/g1Lqk8Td00Oj8xesyKzsG214Xd8m7/7GmJ7nXe5"
)
func MullvadCountryChoices() (choices []string) {
servers := MullvadServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Country
}
return makeUnique(choices)
}
func MullvadCityChoices() (choices []string) {
servers := MullvadServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].City
}
return makeUnique(choices)
}
func MullvadISPChoices() (choices []string) {
servers := MullvadServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].ISP
}
return makeUnique(choices)
}
//nolint:dupl,lll
// MullvadServers returns a slice of all the server information for Mullvad.
func MullvadServers() []models.MullvadServer {
return []models.MullvadServer{
{Country: "Albania", City: "Tirana", ISP: "iRegister", Owned: false, IPs: []net.IP{{31, 171, 154, 210}}, IPsV6: []net.IP{{0x2a, 0x4, 0x27, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Australia", City: "Adelaide", ISP: "Intergrid", Owned: false, IPs: []net.IP{{116, 206, 231, 58}}, IPsV6: []net.IP{{0x24, 0x7, 0xa0, 0x80, 0x50, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Australia", City: "Brisbane", ISP: "Intergrid", Owned: false, IPs: []net.IP{{43, 245, 160, 162}}, IPsV6: []net.IP{{0x24, 0x7, 0xa0, 0x80, 0x20, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Australia", City: "Canberra", ISP: "Intergrid", Owned: false, IPs: []net.IP{{116, 206, 229, 98}}, IPsV6: []net.IP{{0x24, 0x7, 0xa0, 0x80, 0x40, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Australia", City: "Melbourne", ISP: "Intergrid", Owned: false, IPs: []net.IP{{116, 206, 228, 202}, {116, 206, 228, 242}, {116, 206, 230, 98}}, IPsV6: []net.IP{{0x24, 0x7, 0xa0, 0x80, 0x30, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x24, 0x7, 0xa0, 0x80, 0x30, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x24, 0x7, 0xa0, 0x80, 0x30, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "Australia", City: "Perth", ISP: "Intergrid", Owned: false, IPs: []net.IP{{103, 77, 235, 66}}, IPsV6: []net.IP{{0x24, 0x0, 0xfa, 0x80, 0x0, 0x5, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Australia", City: "Sydney", ISP: "Intergrid", Owned: false, IPs: []net.IP{{43, 245, 162, 130}, {103, 77, 232, 130}, {103, 77, 232, 146}}, IPsV6: []net.IP{{0x24, 0x0, 0xfa, 0x80, 0x0, 0x1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x24, 0x0, 0xfa, 0x80, 0x0, 0x1, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x24, 0x0, 0xfa, 0x80, 0x0, 0x1, 0x0, 0x15, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Australia", City: "Sydney", ISP: "M247", Owned: false, IPs: []net.IP{{89, 44, 10, 18}, {89, 44, 10, 34}, {89, 44, 10, 50}, {89, 44, 10, 194}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x84, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x84, 0x0, 0x29, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x84, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x84, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "Austria", City: "Vienna", ISP: "M247", Owned: false, IPs: []net.IP{{5, 253, 207, 34}, {86, 107, 21, 210}, {86, 107, 21, 226}, {86, 107, 21, 242}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x29, 0x0, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x29, 0x0, 0x5a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x29, 0x0, 0x5b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x29, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x4f}}},
{Country: "Belgium", City: "Brussels", ISP: "M247", Owned: false, IPs: []net.IP{{37, 120, 143, 138}, {37, 120, 218, 138}, {37, 120, 218, 146}, {91, 207, 57, 50}, {185, 104, 186, 202}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x27, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x27, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x27, 0x0, 0x32, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x27, 0x0, 0x54, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x27, 0x0, 0x55, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}}},
{Country: "Brazil", City: "Sao Paulo", ISP: "Heficed", Owned: false, IPs: []net.IP{{191, 101, 62, 178}}, IPsV6: []net.IP{{0x28, 0x3, 0x0, 0x80, 0x80, 0x3, 0x80, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Brazil", City: "Sao Paulo", ISP: "Qnax", Owned: false, IPs: []net.IP{{177, 67, 80, 186}}, IPsV6: []net.IP{{0x28, 0x4, 0x53, 0x64, 0x21, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Bulgaria", City: "Sofia", ISP: "M247", Owned: false, IPs: []net.IP{{37, 120, 152, 114}, {37, 120, 152, 146}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x30, 0x0, 0x19, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x30, 0x0, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Canada", City: "Montreal", ISP: "M247", Owned: false, IPs: []net.IP{{89, 36, 78, 18}, {89, 36, 78, 34}, {89, 36, 78, 50}, {89, 36, 78, 66}, {89, 36, 78, 82}, {89, 36, 78, 98}, {89, 36, 78, 114}, {89, 36, 78, 130}}, IPsV6: []net.IP{{0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xb6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xb7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xb8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xba, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x0, 0xc9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x9, 0x1, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "Canada", City: "Toronto", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 132, 34}, {198, 54, 132, 50}, {198, 54, 132, 66}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x60, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x60, 0x0, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x60, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "Canada", City: "Vancouver", ISP: "100TB", Owned: false, IPs: []net.IP{{172, 83, 40, 38}}, IPsV6: []net.IP{{0x26, 0x7, 0xf7, 0xa0, 0x0, 0xd, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Canada", City: "Vancouver", ISP: "Esecuredata", Owned: false, IPs: []net.IP{{71, 19, 248, 240}, {71, 19, 249, 81}}, IPsV6: []net.IP{{0x26, 0x5, 0x0, 0x80, 0x0, 0x18, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4}, {0x26, 0x5, 0x0, 0x80, 0x0, 0x19, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5}}},
{Country: "Czech Republic", City: "Prague", ISP: "M247", Owned: false, IPs: []net.IP{{185, 156, 174, 146}, {185, 156, 174, 170}, {185, 216, 35, 242}, {217, 138, 199, 74}, {217, 138, 199, 82}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x33, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x33, 0x0, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x33, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x33, 0x0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x33, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}}},
{Country: "Denmark", City: "Copenhagen", ISP: "31173", Owned: true, IPs: []net.IP{{45, 129, 56, 81}, {141, 98, 254, 71}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x8, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x8, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Denmark", City: "Copenhagen", ISP: "Asergo", Owned: false, IPs: []net.IP{{82, 103, 140, 213}}, IPsV6: []net.IP{{0x2a, 0x0, 0x90, 0x80, 0x0, 0x1, 0x9, 0x8c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Denmark", City: "Copenhagen", ISP: "Blix", Owned: false, IPs: []net.IP{{134, 90, 149, 138}}, IPsV6: []net.IP{{0x2a, 0x2, 0xed, 0x1, 0x41, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Denmark", City: "Copenhagen", ISP: "M247", Owned: false, IPs: []net.IP{{89, 45, 7, 130}, {89, 45, 7, 146}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x37, 0x0, 0x5b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x37, 0x0, 0x5c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x4f}}},
{Country: "Finland", City: "Helsinki", ISP: "Creanova", Owned: true, IPs: []net.IP{{185, 204, 1, 171}, {185, 204, 1, 172}, {185, 204, 1, 173}, {185, 204, 1, 174}, {185, 204, 1, 175}, {185, 204, 1, 176}, {185, 212, 149, 201}}, IPsV6: []net.IP{{0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0xc, 0xf0, 0x40, 0x0, 0x0, 0x27, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}}},
{Country: "France", City: "Paris", ISP: "31173", Owned: true, IPs: []net.IP{{193, 32, 126, 81}, {193, 32, 126, 82}, {193, 32, 126, 83}, {193, 32, 126, 84}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x9, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x9, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x9, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x9, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "France", City: "Paris", ISP: "M247", Owned: false, IPs: []net.IP{{89, 44, 9, 19}, {89, 44, 9, 35}, {194, 110, 113, 3}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x25, 0x0, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x25, 0x0, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x25, 0x0, 0xd2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "Germany", City: "Frankfurt", ISP: "31173", Owned: true, IPs: []net.IP{{185, 213, 155, 131}, {185, 213, 155, 132}, {185, 213, 155, 133}, {185, 213, 155, 134}, {185, 213, 155, 135}, {185, 213, 155, 136}, {185, 213, 155, 137}, {185, 213, 155, 138}, {185, 213, 155, 139}, {185, 213, 155, 140}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x6, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}}},
{Country: "Germany", City: "Frankfurt", ISP: "M247", Owned: false, IPs: []net.IP{{193, 27, 14, 2}, {193, 27, 14, 18}, {193, 27, 14, 34}, {193, 27, 14, 50}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x20, 0x3, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x20, 0x3, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x20, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x20, 0x3, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x4f}}},
{Country: "Greece", City: "Athens", ISP: "aweb", Owned: false, IPs: []net.IP{{185, 226, 67, 168}}, IPsV6: []net.IP{{0x2a, 0xc, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Hong Kong", City: "Hong Kong", ISP: "Leaseweb", Owned: false, IPs: []net.IP{{209, 58, 184, 146}, {209, 58, 185, 53}, {209, 58, 185, 186}}, IPsV6: []net.IP{{0x20, 0x1, 0xd, 0xf1, 0x8, 0x1, 0xa0, 0x3, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xd, 0xf1, 0x8, 0x1, 0xa0, 0x3, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xd, 0xf1, 0x8, 0x1, 0xa0, 0x5, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Hong Kong", City: "Hong Kong", ISP: "M247", Owned: false, IPs: []net.IP{{89, 45, 6, 50}, {89, 45, 6, 66}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x92, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x92, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Hungary", City: "Budapest", ISP: "M247", Owned: false, IPs: []net.IP{{86, 106, 74, 34}, {86, 106, 74, 50}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x26, 0x0, 0xab, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x26, 0x0, 0xac, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "Ireland", City: "Dublin", ISP: "M247", Owned: false, IPs: []net.IP{{217, 138, 222, 82}, {217, 138, 222, 90}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x88, 0x0, 0x5a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x88, 0x0, 0x5b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Israel", City: "Tel Aviv", ISP: "HQServ", Owned: false, IPs: []net.IP{{185, 191, 207, 210}}, IPsV6: []net.IP{{0x2a, 0xa, 0x1d, 0xc4, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Italy", City: "Milan", ISP: "M247", Owned: false, IPs: []net.IP{{89, 40, 182, 146}, {89, 40, 182, 210}, {192, 145, 127, 98}, {192, 145, 127, 114}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x24, 0x0, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x24, 0x0, 0x77, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x24, 0x0, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x24, 0x0, 0x79, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "Japan", City: "Tokyo", ISP: "M247", Owned: false, IPs: []net.IP{{217, 138, 252, 50}, {217, 138, 252, 162}, {217, 138, 252, 178}, {217, 138, 252, 194}, {217, 138, 252, 210}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x40, 0x0, 0xb1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x40, 0x0, 0xb2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x40, 0x0, 0xb3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x40, 0x0, 0xb4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x40, 0x0, 0xb5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}}},
{Country: "Latvia", City: "Riga", ISP: "Makonix", Owned: false, IPs: []net.IP{{31, 170, 22, 2}}, IPsV6: []net.IP{{0x2a, 0x0, 0xc, 0x68, 0x0, 0x0, 0xcb, 0xcf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Luxembourg", City: "Luxembourg", ISP: "Evoluso", Owned: false, IPs: []net.IP{{92, 223, 89, 160}, {92, 223, 89, 182}}, IPsV6: []net.IP{{0x2a, 0x3, 0x90, 0xc0, 0x0, 0x83, 0x29, 0x53, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x90, 0xc0, 0x0, 0x83, 0x29, 0x53, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Moldova", City: "Chisinau", ISP: "Trabia", Owned: false, IPs: []net.IP{{178, 175, 142, 194}}, IPsV6: []net.IP{{0x2a, 0x0, 0x1d, 0xc0, 0x29, 0x25, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Netherlands", City: "Amsterdam", ISP: "31173", Owned: true, IPs: []net.IP{{185, 65, 134, 131}, {185, 65, 134, 132}, {185, 65, 134, 133}, {185, 65, 134, 134}, {185, 65, 134, 135}, {185, 65, 134, 136}, {185, 65, 134, 139}, {185, 65, 134, 140}, {185, 65, 134, 141}, {185, 65, 134, 142}, {185, 65, 134, 143}, {185, 65, 134, 144}, {185, 65, 134, 145}, {185, 65, 134, 146}, {185, 65, 134, 147}, {185, 65, 134, 148}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x3, 0xf0, 0x11,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0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Norway", City: "Oslo", ISP: "Blix", Owned: true, IPs: []net.IP{{91, 90, 44, 11}, {91, 90, 44, 12}, {91, 90, 44, 13}, {91, 90, 44, 14}, {91, 90, 44, 15}, {91, 90, 44, 16}, {91, 90, 44, 17}, {91, 90, 44, 18}}, IPsV6: []net.IP{{0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0x2, 0x20, 0xc8, 0x41, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}}},
{Country: "Poland", City: "Warsaw", ISP: "M247", Owned: false, IPs: []net.IP{{37, 120, 156, 162}, {37, 120, 211, 186}, {37, 120, 211, 194}, {37, 120, 211, 202}, {185, 244, 214, 210}, {185, 244, 214, 215}}, IPsV6: []net.IP{{0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0x0, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0x0, 0x3a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0x0, 0x3b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x13, 0xb, 0xb1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Romania", City: "Bucharest", ISP: "M247", Owned: false, IPs: []net.IP{{185, 163, 110, 66}, {185, 163, 110, 98}}, IPsV6: []net.IP{{0x2a, 0x4, 0x9d, 0xc0, 0x0, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x1f}, {0x2a, 0x4, 0x9d, 0xc0, 0x0, 0x0, 0x0, 0x92, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}}},
{Country: "Serbia", City: "Belgrade", ISP: "M247", Owned: false, IPs: []net.IP{{89, 38, 224, 98}, {89, 38, 224, 114}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x7d, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x7d, 0x0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "Serbia", City: "Nis", ISP: "ninet", Owned: false, IPs: []net.IP{{176, 104, 107, 118}}, IPsV6: []net.IP{{0x2a, 0x6, 0x1, 0x85, 0x0, 0x1, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Singapore", City: "Singapore", ISP: "M247", Owned: false, IPs: []net.IP{{89, 38, 225, 34}, {94, 198, 43, 2}, {94, 198, 43, 18}}, IPsV6: []net.IP{{0x2a, 0xa, 0xb6, 0x40, 0x0, 0x1, 0x0, 0x54, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0xa, 0xb6, 0x40, 0x0, 0x1, 0x0, 0x55, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xa, 0xb6, 0x40, 0x0, 0x1, 0x0, 0x56, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Spain", City: "Madrid", ISP: "M247", Owned: false, IPs: []net.IP{{45, 152, 183, 26}, {45, 152, 183, 42}, {89, 238, 178, 34}, {89, 238, 178, 74}, {195, 206, 107, 146}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x23, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x23, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf2}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x23, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x23, 0x0, 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x23, 0x0, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}}},
{Country: "Sweden", City: "Gothenburg", ISP: "31173", Owned: true, IPs: []net.IP{{185, 213, 154, 131}, {185, 213, 154, 132}, {185, 213, 154, 133}, {185, 213, 154, 134}, {185, 213, 154, 135}, {185, 213, 154, 136}, {185, 213, 154, 137}, {185, 213, 154, 138}, {185, 213, 154, 139}, {185, 213, 154, 140}, {185, 213, 154, 141}, {185, 213, 154, 142}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x5, 0xf0, 0x11, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}}},
{Country: "Sweden", City: "Helsingborg", ISP: "31173", Owned: true, IPs: []net.IP{{185, 213, 152, 131}, {185, 213, 152, 132}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x2, 0xf7, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x2, 0xf7, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "Sweden", City: "Malmö", ISP: "31173", Owned: true, IPs: []net.IP{{45, 83, 220, 87}, {45, 83, 220, 88}, {45, 83, 220, 89}, {45, 83, 220, 90}, {45, 83, 220, 91}, {45, 83, 220, 92}, {45, 83, 220, 93}, {141, 98, 255, 83}, {141, 98, 255, 84}, {141, 98, 255, 85}, {141, 98, 255, 86}, {141, 98, 255, 87}, {141, 98, 255, 88}, {141, 98, 255, 89}, {141, 98, 255, 90}, {141, 98, 255, 91}, {141, 98, 255, 92}, {141, 98, 255, 93}, {141, 98, 255, 94}, {193, 138, 218, 132}, {193, 138, 218, 133}, {193, 138, 218, 134}, {193, 138, 218, 135}, {193, 138, 218, 136}, {193, 138, 218, 137}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xe0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xe0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xe0, 0x11,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 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xf}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x1, 0xf4, 0x10, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}}},
{Country: "Sweden", City: "Stockholm", ISP: "31173", Owned: true, IPs: []net.IP{{185, 65, 135, 136}, {185, 65, 135, 137}, {185, 65, 135, 138}, {185, 65, 135, 139}, {185, 65, 135, 140}, {185, 65, 135, 141}, {185, 65, 135, 142}, {185, 65, 135, 143}, {185, 65, 135, 144}, {185, 65, 135, 145}, {185, 65, 135, 146}, {185, 65, 135, 147}, {185, 65, 135, 148}, {185, 65, 135, 149}, {185, 65, 135, 150}, {185, 65, 135, 151}, {185, 65, 135, 152}, {185, 65, 135, 153}, {185, 65, 135, 154}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x4e}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x7f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x9f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xf}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x4, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x4f}}},
{Country: "Switzerland", City: "Zurich", ISP: "31173", Owned: true, IPs: []net.IP{{193, 32, 127, 81}, {193, 32, 127, 82}, {193, 32, 127, 83}, {193, 32, 127, 84}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0xa, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0xa, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0xa, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0xa, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "Switzerland", City: "Zurich", ISP: "M247", Owned: false, IPs: []net.IP{{91, 193, 4, 2}, {91, 193, 4, 18}, {91, 193, 4, 34}, {91, 193, 4, 50}, {91, 193, 4, 66}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x28, 0x0, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x28, 0x0, 0x85, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x28, 0x0, 0x86, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x28, 0x0, 0x87, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x28, 0x0, 0x97, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "Switzerland", City: "Zurich", ISP: "PrivateLayer", Owned: false, IPs: []net.IP{{81, 17, 20, 34}, {179, 43, 128, 170}}, IPsV6: []net.IP{{0x2a, 0x2, 0x29, 0xb8, 0xdc, 0x1, 0x5, 0x97, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x2, 0x29, 0xb8, 0xdc, 0x1, 0x18, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "UK", City: "London", ISP: "31173", Owned: true, IPs: []net.IP{{141, 98, 252, 131}, {141, 98, 252, 132}, {141, 98, 252, 133}, {141, 98, 252, 138}, {141, 98, 252, 139}, {141, 98, 252, 140}, {185, 195, 232, 84}, {185, 195, 232, 85}, {185, 195, 232, 86}}, IPsV6: []net.IP{{0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x2a, 0x3, 0x1b, 0x20, 0x0, 0x7, 0xf0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}}},
{Country: "UK", City: "London", ISP: "M247", Owned: false, IPs: []net.IP{{45, 87, 215, 50}, {185, 200, 118, 178}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x31, 0x2, 0x35, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x31, 0x2, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "UK", City: "Manchester", ISP: "M247", Owned: false, IPs: []net.IP{{37, 120, 159, 164}, {89, 238, 132, 36}, {194, 37, 96, 180}, {217, 151, 98, 68}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x21, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x21, 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x21, 0x0, 0x34, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x21, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "Atlanta GA", ISP: "100TB", Owned: false, IPs: []net.IP{{66, 115, 180, 227}, {66, 115, 180, 228}, {66, 115, 180, 229}, {66, 115, 180, 230}, {107, 152, 108, 62}}, IPsV6: []net.IP{{0x26, 0x7, 0xf7, 0xa0, 0x0, 0x1, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0x1, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0x1, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0x1, 0x0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0x6, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}}},
{Country: "USA", City: "Atlanta GA", ISP: "Quadranet", Owned: false, IPs: []net.IP{{104, 129, 24, 242}}, IPsV6: []net.IP{{0x26, 0x7, 0xfc, 0xd0, 0xaa, 0x80, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "USA", City: "Chicago IL", ISP: "Quadranet", Owned: false, IPs: []net.IP{{104, 129, 31, 26}}, IPsV6: []net.IP{{0x26, 0x7, 0xfc, 0xd0, 0xbb, 0x80, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "Chicago IL", ISP: "Tzulo", Owned: false, IPs: []net.IP{{68, 235, 43, 10}, {68, 235, 43, 18}, {68, 235, 43, 26}, {68, 235, 43, 34}, {68, 235, 43, 42}, {68, 235, 43, 50}, {68, 235, 43, 58}, {68, 235, 43, 66}, {68, 235, 43, 74}, {68, 235, 43, 122}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x52, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x54, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x55, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x56, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf}, {0x26, 0x7, 0x90, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "Dallas TX", ISP: "100TB", Owned: false, IPs: []net.IP{{174, 127, 113, 3}, {174, 127, 113, 4}, {174, 127, 113, 5}, {174, 127, 113, 6}, {174, 127, 113, 7}}, IPsV6: []net.IP{{0x26, 0x6, 0x2e, 0x0, 0x80, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x6, 0x2e, 0x0, 0x80, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x6, 0x2e, 0x0, 0x80, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x26, 0x6, 0x2e, 0x0, 0x80, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x26, 0x6, 0x2e, 0x0, 0x80, 0x7, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}}},
{Country: "USA", City: "Dallas TX", ISP: "M247", Owned: false, IPs: []net.IP{{193, 27, 13, 34}, {193, 27, 13, 50}, {193, 27, 13, 66}, {193, 27, 13, 82}, {193, 27, 13, 178}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x9a, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x9a, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x9a, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x9a, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x20, 0x1, 0xa, 0xc8, 0x0, 0x9a, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "Dallas TX", ISP: "Quadranet", Owned: false, IPs: []net.IP{{96, 44, 145, 18}, {96, 44, 147, 130}}, IPsV6: []net.IP{{0x26, 0x7, 0xfc, 0xd0, 0xda, 0x80, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8}, {0x26, 0x7, 0xfc, 0xd0, 0xda, 0x80, 0x18, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9}}},
{Country: "USA", City: "Denver CO", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 128, 66}, {198, 54, 128, 74}, {198, 54, 128, 106}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x20, 0x0, 0x0, 0x17, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x20, 0x0, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x20, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "USA", City: "Los Angeles CA", ISP: "100TB", Owned: false, IPs: []net.IP{{104, 200, 152, 66}, {107, 181, 168, 130}}, IPsV6: []net.IP{{0x26, 0x7, 0xf7, 0xa0, 0x0, 0x3, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0x3, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}}},
{Country: "USA", City: "Los Angeles CA", ISP: "M247", Owned: false, IPs: []net.IP{{89, 46, 114, 15}, {89, 46, 114, 28}, {89, 46, 114, 41}, {89, 46, 114, 54}, {89, 46, 114, 67}, {89, 46, 114, 80}, {89, 46, 114, 93}, {89, 46, 114, 106}, {89, 46, 114, 119}, {89, 46, 114, 132}, {89, 46, 114, 145}, {89, 46, 114, 158}, {89, 46, 114, 171}, {89, 46, 114, 184}, {89, 46, 114, 197}, {89, 46, 114, 210}}, IPsV6: []net.IP{{0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x8, 0x0, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0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0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "Miami FL", ISP: "M247", Owned: false, IPs: []net.IP{{94, 198, 42, 50}, {94, 198, 42, 66}, {94, 198, 42, 82}, {94, 198, 42, 98}, {193, 27, 12, 2}, {193, 27, 12, 18}}, IPsV6: []net.IP{{0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0x0, 0x33, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0x0, 0x34, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0x0, 0x35, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0x0, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0xa, 0xd6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x6, 0xa, 0xd7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
{Country: "USA", City: "New York NY", ISP: "100TB", Owned: false, IPs: []net.IP{{107, 182, 226, 206}, {107, 182, 226, 218}}, IPsV6: []net.IP{{0x26, 0x6, 0x2e, 0x0, 0x80, 0x3, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x26, 0x6, 0x2e, 0x0, 0x80, 0x3, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}}},
{Country: "USA", City: "New York NY", ISP: "M247", Owned: false, IPs: []net.IP{{86, 106, 121, 15}, {86, 106, 121, 28}, {86, 106, 121, 41}, {86, 106, 121, 54}, {86, 106, 121, 67}, {86, 106, 121, 80}, {86, 106, 121, 93}, {86, 106, 121, 106}, {86, 106, 121, 119}, {89, 46, 62, 15}, {89, 46, 62, 28}, {89, 46, 62, 41}, {89, 46, 62, 54}, {89, 46, 62, 67}, {89, 46, 62, 80}, {89, 46, 62, 93}, {89, 46, 62, 106}, {89, 46, 62, 119}}, IPsV6: []net.IP{{0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x71, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x72, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x73, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x75, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x77, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x79, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x99, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x3f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x4f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x5f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x6f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0x9f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x7f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0xa1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x8f}, {0x2a, 0xd, 0x56, 0x0, 0x0, 0x24, 0xa, 0xa2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x9f}}},
{Country: "USA", City: "Phoenix AZ", ISP: "100TB", Owned: false, IPs: []net.IP{{107, 152, 99, 86}}, IPsV6: []net.IP{{0x26, 0x7, 0xf7, 0xa0, 0x0, 0x5, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}}},
{Country: "USA", City: "Phoenix AZ", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 133, 34}, {198, 54, 133, 50}, {198, 54, 133, 66}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x70, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x70, 0x0, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x70, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}}},
{Country: "USA", City: "Raleigh NC", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 130, 34}, {198, 54, 130, 50}, {198, 54, 130, 66}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x40, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x40, 0x0, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x40, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}}},
{Country: "USA", City: "Salt Lake City UT", ISP: "100TB", Owned: false, IPs: []net.IP{{69, 4, 234, 132}, {69, 4, 234, 133}, {69, 4, 234, 134}, {69, 4, 234, 135}, {69, 4, 234, 136}, {69, 4, 234, 137}}, IPsV6: []net.IP{{0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f}, {0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f}, {0x26, 0x6, 0x2e, 0x0, 0x0, 0x0, 0x0, 0xb9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f}}},
{Country: "USA", City: "San Jose CA", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 134, 34}, {198, 54, 134, 50}, {198, 54, 134, 66}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x80, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x80, 0x0, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x80, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}}},
{Country: "USA", City: "Seattle WA", ISP: "100TB", Owned: false, IPs: []net.IP{{104, 200, 129, 42}, {104, 200, 129, 110}, {104, 200, 129, 150}}, IPsV6: []net.IP{{0x26, 0x7, 0xf7, 0xa0, 0x0, 0xc, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0xc, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f}, {0x26, 0x7, 0xf7, 0xa0, 0x0, 0xc, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "USA", City: "Seattle WA", ISP: "Tzulo", Owned: false, IPs: []net.IP{{198, 54, 131, 34}, {198, 54, 131, 50}, {198, 54, 131, 66}}, IPsV6: []net.IP{{0x26, 0x7, 0x90, 0x0, 0x50, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x1f}, {0x26, 0x7, 0x90, 0x0, 0x50, 0x0, 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x2f}, {0x26, 0x7, 0x90, 0x0, 0x50, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x3f}}},
{Country: "USA", City: "Secaucus NJ", ISP: "Quadranet", Owned: false, IPs: []net.IP{{23, 226, 131, 130}, {23, 226, 131, 154}}, IPsV6: []net.IP{{0x26, 0x7, 0xfc, 0xd0, 0xcc, 0xc0, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}, {0x26, 0x7, 0xfc, 0xd0, 0xcc, 0xc0, 0x1d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f}}},
{Country: "United Arab Emirates", City: "Dubai", ISP: "M247", Owned: false, IPs: []net.IP{{45, 9, 249, 34}}, IPsV6: []net.IP{{0x20, 0x1, 0xa, 0xc8, 0x0, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f}}},
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,6 @@
package constants
import (
"github.com/qdm12/private-internet-access-docker/internal/models"
)
const (
TUN models.VPNDevice = "tun0"
TAP models.VPNDevice = "tap0"
TUN = "tun0"
TAP = "tap0"
)

View File

@@ -1,30 +1,30 @@
package constants
import (
"github.com/qdm12/private-internet-access-docker/internal/models"
)
const (
// UnboundConf is the file path to the Unbound configuration file
UnboundConf models.Filepath = "/etc/unbound/unbound.conf"
// ResolvConf is the file path to the system resolv.conf file
ResolvConf models.Filepath = "/etc/resolv.conf"
// CACertificates is the file path to the CA certificates file
CACertificates models.Filepath = "/etc/ssl/certs/ca-certificates.crt"
// OpenVPNAuthConf is the file path to the OpenVPN auth file
OpenVPNAuthConf models.Filepath = "/etc/openvpn/auth.conf"
// OpenVPNConf is the file path to the OpenVPN client configuration file
OpenVPNConf models.Filepath = "/etc/openvpn/target.ovpn"
// TunnelDevice is the file path to tun device
TunnelDevice models.Filepath = "/dev/net/tun"
// NetRoute is the path to the file containing information on the network route
NetRoute models.Filepath = "/proc/net/route"
// TinyProxyConf is the filepath to the tinyproxy configuration file
TinyProxyConf models.Filepath = "/etc/tinyproxy/tinyproxy.conf"
// ShadowsocksConf is the filepath to the shadowsocks configuration file
ShadowsocksConf models.Filepath = "/etc/shadowsocks.json"
// RootHints is the filepath to the root.hints file used by Unbound
RootHints models.Filepath = "/etc/unbound/root.hints"
// RootKey is the filepath to the root.key file used by Unbound
RootKey models.Filepath = "/etc/unbound/root.key"
)
package constants
const (
// UnboundConf is the file path to the Unbound configuration file.
UnboundConf string = "/etc/unbound/unbound.conf"
// ResolvConf is the file path to the system resolv.conf file.
ResolvConf string = "/etc/resolv.conf"
// CACertificates is the file path to the CA certificates file.
CACertificates string = "/etc/ssl/certs/ca-certificates.crt"
// OpenVPNAuthConf is the file path to the OpenVPN auth file.
OpenVPNAuthConf string = "/etc/openvpn/auth.conf"
// OpenVPNConf is the file path to the OpenVPN client configuration file.
OpenVPNConf string = "/etc/openvpn/target.ovpn"
// PIAPortForward is the file path to the port forwarding JSON information for PIA servers.
PIAPortForward string = "/gluetun/piaportforward.json"
// TunnelDevice is the file path to tun device.
TunnelDevice string = "/dev/net/tun"
// NetRoute is the path to the file containing information on the network route.
NetRoute string = "/proc/net/route"
// RootHints is the filepath to the root.hints file used by Unbound.
RootHints string = "/etc/unbound/root.hints"
// RootKey is the filepath to the root.key file used by Unbound.
RootKey string = "/etc/unbound/root.key"
// Client key filepath, used by Cyberghost.
ClientKey string = "/gluetun/client.key"
// Client certificate filepath, used by Cyberghost.
ClientCertificate string = "/gluetun/client.crt"
// Servers information filepath.
ServersData = "/gluetun/servers.json"
)

View File

@@ -1,90 +1,611 @@
package constants
import (
"fmt"
"strings"
"github.com/qdm12/private-internet-access-docker/internal/models"
)
const (
// PIAEncryptionNormal is the normal level of encryption for communication with PIA servers
PIAEncryptionNormal models.PIAEncryption = "normal"
// PIAEncryptionStrong is the strong level of encryption for communication with PIA servers
PIAEncryptionStrong models.PIAEncryption = "strong"
)
const (
PIAX509CRL_NORMAL = "MIICWDCCAUAwDQYJKoZIhvcNAQENBQAwgegxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTETMBEGA1UEBxMKTG9zQW5nZWxlczEgMB4GA1UEChMXUHJpdmF0ZSBJbnRlcm5ldCBBY2Nlc3MxIDAeBgNVBAsTF1ByaXZhdGUgSW50ZXJuZXQgQWNjZXNzMSAwHgYDVQQDExdQcml2YXRlIEludGVybmV0IEFjY2VzczEgMB4GA1UEKRMXUHJpdmF0ZSBJbnRlcm5ldCBBY2Nlc3MxLzAtBgkqhkiG9w0BCQEWIHNlY3VyZUBwcml2YXRlaW50ZXJuZXRhY2Nlc3MuY29tFw0xNjA3MDgxOTAwNDZaFw0zNjA3MDMxOTAwNDZaMCYwEQIBARcMMTYwNzA4MTkwMDQ2MBECAQYXDDE2MDcwODE5MDA0NjANBgkqhkiG9w0BAQ0FAAOCAQEAQZo9X97ci8EcPYu/uK2HB152OZbeZCINmYyluLDOdcSvg6B5jI+ffKN3laDvczsG6CxmY3jNyc79XVpEYUnq4rT3FfveW1+Ralf+Vf38HdpwB8EWB4hZlQ205+21CALLvZvR8HcPxC9KEnev1mU46wkTiov0EKc+EdRxkj5yMgv0V2Reze7AP+NQ9ykvDScH4eYCsmufNpIjBLhpLE2cuZZXBLcPhuRzVoU3l7A9lvzG9mjA5YijHJGHNjlWFqyrn1CfYS6koa4TGEPngBoAziWRbDGdhEgJABHrpoaFYaL61zqyMR6jC0K2ps9qyZAN74LEBedEfK7tBOzWMwr58A=="
PIAX509CRL_STRONG = "MIIDWDCCAUAwDQYJKoZIhvcNAQENBQAwgegxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTETMBEGA1UEBxMKTG9zQW5nZWxlczEgMB4GA1UEChMXUHJpdmF0ZSBJbnRlcm5ldCBBY2Nlc3MxIDAeBgNVBAsTF1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rnXJUp2KODmKdvBI7co245lHBABWikk8VfejQSlCtDBXn644ZMtAdoxKNfR2WTFVEwJiyd1Fzx0yujuiXDROLhISLQDRjVVAvawrAtLZWYK31bY7KlezPlQnl/D9Asxe85l8jO5+0LdJ6VyOs/Hd4w52alDW/MFySDZSfQHMTIc30hLBJ8OnCEIvluVQQ2UQvoW+no177N9L2Y+M9TcTA62ZyMXShHQGeh20rb4kK8f+iFX8NxtdHVSkxMEFSfDDyQ="
)
func PIAGeoChoices() []string {
return []string{"AU Melbourne", "AU Perth", "AU Sydney", "Austria", "Belgium", "CA Montreal", "CA Toronto", "CA Vancouver", "Czech Republic", "DE Berlin", "DE Frankfurt", "Denmark", "Finland", "France", "Hong Kong", "Hungary", "India", "Ireland", "Israel", "Italy", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Norway", "Poland", "Romania", "Singapore", "Spain", "Sweden", "Switzerland", "UAE", "UK London", "UK Manchester", "UK Southampton", "US Atlanta", "US California", "US Chicago", "US Denver", "US East", "US Florida", "US Houston", "US Las Vegas", "US New York City", "US Seattle", "US Silicon Valley", "US Texas", "US Washington DC", "US West"}
}
func PIAGeoToSubdomainMapping(region models.PIARegion) (subdomain string, err error) {
mapping := map[models.PIARegion]string{
models.PIARegion("AU Melbourne"): "au-melbourne",
models.PIARegion("AU Perth"): "au-perth",
models.PIARegion("AU Sydney"): "au-sydney",
models.PIARegion("Austria"): "austria",
models.PIARegion("Belgium"): "belgium",
models.PIARegion("CA Montreal"): "ca-montreal",
models.PIARegion("CA Toronto"): "ca-toronto",
models.PIARegion("CA Vancouver"): "ca-vancouver",
models.PIARegion("Czech Republic"): "czech",
models.PIARegion("DE Berlin"): "de-berlin",
models.PIARegion("DE Frankfurt"): "de-frankfurt",
models.PIARegion("Denmark"): "denmark",
models.PIARegion("Finland"): "fi",
models.PIARegion("France"): "france",
models.PIARegion("Hong Kong"): "hk",
models.PIARegion("Hungary"): "hungary",
models.PIARegion("India"): "in",
models.PIARegion("Ireland"): "ireland",
models.PIARegion("Israel"): "israel",
models.PIARegion("Italy"): "italy",
models.PIARegion("Japan"): "japan",
models.PIARegion("Luxembourg"): "lu",
models.PIARegion("Mexico"): "mexico",
models.PIARegion("Netherlands"): "nl",
models.PIARegion("New Zealand"): "nz",
models.PIARegion("Norway"): "no",
models.PIARegion("Poland"): "poland",
models.PIARegion("Romania"): "ro",
models.PIARegion("Singapore"): "sg",
models.PIARegion("Spain"): "spain",
models.PIARegion("Sweden"): "sweden",
models.PIARegion("Switzerland"): "swiss",
models.PIARegion("UAE"): "ae",
models.PIARegion("UK London"): "uk-london",
models.PIARegion("UK Manchester"): "uk-manchester",
models.PIARegion("UK Southampton"): "uk-southampton",
models.PIARegion("US Atlanta"): "us-atlanta",
models.PIARegion("US California"): "us-california",
models.PIARegion("US Chicago"): "us-chicago",
models.PIARegion("US Denver"): "us-denver",
models.PIARegion("US East"): "us-east",
models.PIARegion("US Florida"): "us-florida",
models.PIARegion("US Houston"): "us-houston",
models.PIARegion("US Las Vegas"): "us-lasvegas",
models.PIARegion("US New York City"): "us-newyorkcity",
models.PIARegion("US Seattle"): "us-seattle",
models.PIARegion("US Silicon Valley"): "us-siliconvalley",
models.PIARegion("US Texas"): "us-texas",
models.PIARegion("US Washington DC"): "us-washingtondc",
models.PIARegion("US West"): "us-west",
}
subdomain, ok := mapping[region]
if !ok {
return "", fmt.Errorf("PIA region %q does not exist and can only be one of ", strings.Join(PIAGeoChoices(), ","))
}
return subdomain, nil
}
const (
PIAPortForwardURL models.URL = "http://209.222.18.222:2000"
)
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
PIAEncryptionPresetNormal = "normal"
PIAEncryptionPresetStrong = "strong"
PiaX509CRLNormal = "MIICWDCCAUAwDQYJKoZIhvcNAQENBQAwgegxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTETMBEGA1UEBxMKTG9zQW5nZWxlczEgMB4GA1UEChMXUHJpdmF0ZSBJbnRlcm5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f+iFX8NxtdHVSkxMEFSfDDyQ="
)
func PIAGeoChoices() (choices []string) {
servers := PIAServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Region
}
return makeUnique(choices)
}
//nolint:lll
// PIAServers returns a slice of all the server information for PIA.
func PIAServers() []models.PIAServer {
return []models.PIAServer{
{Region: "AU Melbourne", ServerName: "melbourne403", TCP: false, UDP: true, PortForward: true, IP: net.IP{103, 2, 198, 74}},
{Region: "AU Melbourne", ServerName: "melbourne403", TCP: true, UDP: false, PortForward: true, IP: net.IP{103, 2, 198, 73}},
{Region: "AU Melbourne", ServerName: "melbourne406", TCP: true, UDP: false, PortForward: true, IP: net.IP{27, 50, 74, 157}},
{Region: "AU Melbourne", ServerName: "melbourne406", TCP: false, UDP: true, PortForward: true, IP: net.IP{27, 50, 74, 158}},
{Region: "AU Melbourne", ServerName: "melbourne410", TCP: false, UDP: true, PortForward: true, IP: net.IP{43, 242, 69, 53}},
{Region: "AU Melbourne", ServerName: "melbourne410", TCP: true, UDP: false, PortForward: true, IP: net.IP{43, 242, 69, 50}},
{Region: "AU Melbourne", ServerName: "melbourne413", TCP: false, UDP: true, PortForward: true, IP: net.IP{27, 50, 74, 126}},
{Region: "AU Melbourne", ServerName: "melbourne413", TCP: true, UDP: false, PortForward: true, IP: net.IP{27, 50, 74, 115}},
{Region: "AU Melbourne", ServerName: "melbourne414", TCP: false, UDP: true, PortForward: true, IP: net.IP{27, 50, 74, 107}},
{Region: "AU Melbourne", ServerName: "melbourne414", TCP: true, UDP: false, PortForward: true, IP: net.IP{27, 50, 74, 105}},
{Region: "AU Perth", ServerName: "perth403", TCP: true, UDP: false, PortForward: true, IP: net.IP{179, 61, 228, 55}},
{Region: "AU Perth", ServerName: "perth403", TCP: false, UDP: true, PortForward: true, IP: net.IP{179, 61, 228, 9}},
{Region: "AU Perth", ServerName: "perth404", TCP: true, UDP: true, PortForward: true, IP: net.IP{179, 61, 228, 85}},
{Region: "AU Perth", ServerName: "perth405", TCP: true, UDP: true, PortForward: true, IP: net.IP{179, 61, 228, 170}},
{Region: "AU Sydney", ServerName: "sydney401", TCP: false, UDP: true, PortForward: true, IP: net.IP{103, 2, 196, 163}},
{Region: "AU Sydney", ServerName: "sydney401", TCP: true, UDP: false, PortForward: true, IP: net.IP{103, 2, 196, 164}},
{Region: "AU Sydney", ServerName: "sydney404", TCP: false, UDP: true, PortForward: true, IP: net.IP{27, 50, 76, 170}},
{Region: "AU Sydney", ServerName: "sydney404", TCP: true, UDP: false, PortForward: true, IP: net.IP{27, 50, 76, 163}},
{Region: "AU Sydney", ServerName: "sydney409", TCP: true, UDP: false, PortForward: true, IP: net.IP{117, 120, 10, 177}},
{Region: "AU Sydney", ServerName: "sydney409", TCP: false, UDP: true, PortForward: true, IP: net.IP{117, 120, 10, 137}},
{Region: "AU Sydney", ServerName: "sydney413", TCP: true, UDP: true, PortForward: true, IP: net.IP{27, 50, 76, 84}},
{Region: "AU Sydney", ServerName: "sydney414", TCP: true, UDP: false, PortForward: true, IP: net.IP{27, 50, 76, 106}},
{Region: "AU Sydney", ServerName: "sydney414", TCP: false, UDP: true, PortForward: true, IP: net.IP{27, 50, 76, 99}},
{Region: "Albania", ServerName: "tirana401", TCP: true, UDP: false, PortForward: true, IP: net.IP{31, 171, 154, 139}},
{Region: "Albania", ServerName: "tirana401", TCP: false, UDP: true, PortForward: true, IP: net.IP{31, 171, 154, 136}},
{Region: "Albania", ServerName: "tirana402", TCP: true, UDP: true, PortForward: true, IP: net.IP{31, 171, 154, 119}},
{Region: "Albania", ServerName: "tirana403", TCP: false, UDP: true, PortForward: true, IP: net.IP{31, 171, 154, 67}},
{Region: "Albania", ServerName: "tirana403", TCP: true, UDP: false, PortForward: true, IP: net.IP{31, 171, 154, 74}},
{Region: "Albania", ServerName: "tirana404", TCP: true, UDP: false, PortForward: true, IP: net.IP{31, 171, 154, 56}},
{Region: "Albania", ServerName: "tirana404", TCP: false, UDP: true, PortForward: true, IP: net.IP{31, 171, 154, 59}},
{Region: "Algeria", ServerName: "algiers403", TCP: true, UDP: false, PortForward: true, IP: net.IP{176, 125, 228, 4}},
{Region: "Algeria", ServerName: "algiers403", TCP: false, UDP: true, PortForward: true, IP: net.IP{176, 125, 228, 7}},
{Region: "Algeria", ServerName: "algiers404", TCP: false, UDP: true, PortForward: true, IP: net.IP{176, 125, 228, 18}},
{Region: "Algeria", ServerName: "algiers404", TCP: true, UDP: false, PortForward: true, IP: net.IP{176, 125, 228, 26}},
{Region: "Andorra", ServerName: "andorra403", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 82, 5}},
{Region: "Andorra", ServerName: "andorra403", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 82, 7}},
{Region: "Andorra", ServerName: "andorra404", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 241, 82, 16}},
{Region: "Andorra", ServerName: "andorra405", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 82, 36}},
{Region: "Andorra", ServerName: "andorra405", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 82, 29}},
{Region: "Argentina", ServerName: "buenosaires401", TCP: true, UDP: true, PortForward: true, IP: net.IP{190, 106, 134, 86}},
{Region: "Argentina", ServerName: "buenosaires402", TCP: false, UDP: true, PortForward: true, IP: net.IP{190, 106, 134, 109}},
{Region: "Argentina", ServerName: "buenosaires402", TCP: true, UDP: false, PortForward: true, IP: net.IP{190, 106, 134, 104}},
{Region: "Armenia", ServerName: "armenia403", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 253, 160, 5}},
{Region: "Armenia", ServerName: "armenia403", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 253, 160, 6}},
{Region: "Austria", ServerName: "vienna402", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 60, 53}},
{Region: "Austria", ServerName: "vienna402", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 60, 10}},
{Region: "Austria", ServerName: "vienna403", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 60, 67}},
{Region: "Austria", ServerName: "vienna403", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 60, 115}},
{Region: "Bahamas", ServerName: "bahamas403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 238, 18}},
{Region: "Bahamas", ServerName: "bahamas403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 238, 19}},
{Region: "Bahamas", ServerName: "bahamas404", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 238, 6}},
{Region: "Bahamas", ServerName: "bahamas404", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 238, 4}},
{Region: "Bahamas", ServerName: "bahamas405", TCP: true, UDP: true, PortForward: true, IP: net.IP{95, 181, 238, 34}},
{Region: "Bahamas", ServerName: "bahamas406", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 238, 43}},
{Region: "Bahamas", ServerName: "bahamas406", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 238, 45}},
{Region: "Bangladesh", ServerName: "bangladesh403", TCP: true, UDP: true, PortForward: true, IP: net.IP{84, 252, 93, 7}},
{Region: "Belgium", ServerName: "brussels404", TCP: false, UDP: true, PortForward: true, IP: net.IP{37, 120, 143, 148}},
{Region: "Belgium", ServerName: "brussels404", TCP: true, UDP: false, PortForward: true, IP: net.IP{37, 120, 143, 149}},
{Region: "Belgium", ServerName: "brussels409", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 123, 8}},
{Region: "Belgium", ServerName: "brussels409", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 123, 6}},
{Region: "Belgium", ServerName: "brussels410", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 123, 19}},
{Region: "Belgium", ServerName: "brussels410", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 123, 26}},
{Region: "Belgium", ServerName: "brussels414", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 123, 103}},
{Region: "Belgium", ServerName: "brussels414", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 123, 108}},
{Region: "Belgium", ServerName: "brussels415", TCP: false, UDP: true, PortForward: true, IP: net.IP{194, 110, 115, 35}},
{Region: "Belgium", ServerName: "brussels415", TCP: true, UDP: false, PortForward: true, IP: net.IP{194, 110, 115, 39}},
{Region: "Bosnia and Herzegovina", ServerName: "sarajevo402", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 212, 111, 5}},
{Region: "Bosnia and Herzegovina", ServerName: "sarajevo402", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 212, 111, 4}},
{Region: "Brazil", ServerName: "saopaolo401", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 180, 229}},
{Region: "Brazil", ServerName: "saopaolo401", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 180, 227}},
{Region: "Brazil", ServerName: "saopaolo402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 177, 56}},
{Region: "Brazil", ServerName: "saopaolo402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 177, 54}},
{Region: "Brazil", ServerName: "saopaolo403", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 177, 123}},
{Region: "Brazil", ServerName: "saopaolo403", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 177, 125}},
{Region: "Brazil", ServerName: "saopaolo404", TCP: true, UDP: true, PortForward: true, IP: net.IP{45, 133, 180, 243}},
{Region: "Bulgaria", ServerName: "sofia402", TCP: true, UDP: false, PortForward: true, IP: net.IP{217, 138, 221, 89}},
{Region: "Bulgaria", ServerName: "sofia402", TCP: false, UDP: true, PortForward: true, IP: net.IP{217, 138, 221, 83}},
{Region: "Bulgaria", ServerName: "sofia403", TCP: true, UDP: true, PortForward: true, IP: net.IP{217, 138, 221, 76}},
{Region: "CA Montreal", ServerName: "montreal402", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 98, 71, 109}},
{Region: "CA Montreal", ServerName: "montreal402", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 98, 71, 129}},
{Region: "CA Montreal", ServerName: "montreal403", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 98, 71, 30}},
{Region: "CA Montreal", ServerName: "montreal403", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 98, 71, 16}},
{Region: "CA Montreal", ServerName: "montreal405", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 98, 71, 236}},
{Region: "CA Montreal", ServerName: "montreal405", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 98, 71, 226}},
{Region: "CA Montreal", ServerName: "montreal406", TCP: false, UDP: true, PortForward: true, IP: net.IP{199, 36, 223, 46}},
{Region: "CA Montreal", ServerName: "montreal406", TCP: true, UDP: false, PortForward: true, IP: net.IP{199, 36, 223, 20}},
{Region: "CA Montreal", ServerName: "montreal410", TCP: true, UDP: false, PortForward: true, IP: net.IP{199, 36, 223, 230}},
{Region: "CA Montreal", ServerName: "montreal410", TCP: false, UDP: true, PortForward: true, IP: net.IP{199, 36, 223, 207}},
{Region: "CA Ontario", ServerName: "ontario401", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 83, 47, 90}},
{Region: "CA Ontario", ServerName: "ontario401", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 83, 47, 74}},
{Region: "CA Ontario", ServerName: "ontario406", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 98, 80, 144}},
{Region: "CA Ontario", ServerName: "ontario406", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 98, 80, 184}},
{Region: "CA Ontario", ServerName: "ontario407", TCP: true, UDP: true, PortForward: true, IP: net.IP{172, 98, 80, 29}},
{Region: "CA Ontario", ServerName: "ontario408", TCP: true, UDP: false, PortForward: true, IP: net.IP{172, 98, 92, 128}},
{Region: "CA Ontario", ServerName: "ontario408", TCP: false, UDP: true, PortForward: true, IP: net.IP{172, 98, 92, 124}},
{Region: "CA Ontario", ServerName: "ontario409", TCP: false, UDP: true, PortForward: true, IP: net.IP{66, 115, 145, 247}},
{Region: "CA Ontario", ServerName: "ontario409", TCP: true, UDP: false, PortForward: true, IP: net.IP{66, 115, 145, 218}},
{Region: "CA Toronto", ServerName: "toronto403", TCP: false, UDP: true, PortForward: true, IP: net.IP{66, 115, 142, 77}},
{Region: "CA Toronto", ServerName: "toronto403", TCP: true, UDP: false, PortForward: true, IP: net.IP{66, 115, 142, 104}},
{Region: "CA Toronto", ServerName: "toronto420", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 3, 40, 197}},
{Region: "CA Toronto", ServerName: "toronto420", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 3, 40, 204}},
{Region: "CA Toronto", ServerName: "toronto421", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 3, 40, 220}},
{Region: "CA Toronto", ServerName: "toronto421", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 3, 40, 245}},
{Region: "CA Toronto", ServerName: "toronto422", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 3, 42, 29}},
{Region: "CA Toronto", ServerName: "toronto422", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 3, 42, 6}},
{Region: "CA Toronto", ServerName: "toronto424", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 3, 42, 67}},
{Region: "CA Toronto", ServerName: "toronto424", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 3, 42, 79}},
{Region: "CA Vancouver", ServerName: "vancouver401", TCP: true, UDP: false, PortForward: true, IP: net.IP{162, 216, 47, 37}},
{Region: "CA Vancouver", ServerName: "vancouver401", TCP: false, UDP: true, PortForward: true, IP: net.IP{162, 216, 47, 54}},
{Region: "CA Vancouver", ServerName: "vancouver405", TCP: true, UDP: true, PortForward: true, IP: net.IP{162, 216, 47, 150}},
{Region: "CA Vancouver", ServerName: "vancouver408", TCP: true, UDP: true, PortForward: true, IP: net.IP{208, 78, 42, 28}},
{Region: "CA Vancouver", ServerName: "vancouver411", TCP: true, UDP: false, PortForward: true, IP: net.IP{208, 78, 42, 188}},
{Region: "CA Vancouver", ServerName: "vancouver411", TCP: false, UDP: true, PortForward: true, IP: net.IP{208, 78, 42, 168}},
{Region: "CA Vancouver", ServerName: "vancouver412", TCP: true, UDP: false, PortForward: true, IP: net.IP{208, 78, 42, 194}},
{Region: "CA Vancouver", ServerName: "vancouver412", TCP: false, UDP: true, PortForward: true, IP: net.IP{208, 78, 42, 205}},
{Region: "Cambodia", ServerName: "cambodia401", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 215, 235, 107}},
{Region: "Cambodia", ServerName: "cambodia401", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 215, 235, 108}},
{Region: "Cambodia", ServerName: "cambodia402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 215, 235, 117}},
{Region: "Cambodia", ServerName: "cambodia402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 215, 235, 123}},
{Region: "China", ServerName: "china404", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 80, 9}},
{Region: "China", ServerName: "china404", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 80, 8}},
{Region: "Croatia", ServerName: "zagreb402", TCP: false, UDP: true, PortForward: true, IP: net.IP{146, 70, 8, 137}},
{Region: "Croatia", ServerName: "zagreb402", TCP: true, UDP: false, PortForward: true, IP: net.IP{146, 70, 8, 140}},
{Region: "Cyprus", ServerName: "cyprus403", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 253, 162, 9}},
{Region: "Cyprus", ServerName: "cyprus403", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 253, 162, 8}},
{Region: "Czech Republic", ServerName: "prague401", TCP: true, UDP: true, PortForward: true, IP: net.IP{212, 102, 39, 120}},
{Region: "Czech Republic", ServerName: "prague402", TCP: true, UDP: true, PortForward: true, IP: net.IP{212, 102, 39, 158}},
{Region: "Czech Republic", ServerName: "prague403", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 39, 200}},
{Region: "Czech Republic", ServerName: "prague403", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 39, 250}},
{Region: "DE Berlin", ServerName: "berlin416", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 13, 1, 14}},
{Region: "DE Berlin", ServerName: "berlin416", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 13, 1, 7}},
{Region: "DE Berlin", ServerName: "berlin417", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 13, 1, 19}},
{Region: "DE Berlin", ServerName: "berlin417", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 13, 1, 30}},
{Region: "DE Berlin", ServerName: "berlin420", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 13, 1, 70}},
{Region: "DE Berlin", ServerName: "berlin420", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 13, 1, 74}},
{Region: "DE Berlin", ServerName: "berlin422", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 13, 1, 105}},
{Region: "DE Berlin", ServerName: "berlin422", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 13, 1, 96}},
{Region: "DE Berlin", ServerName: "berlin424", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 13, 1, 125}},
{Region: "DE Berlin", ServerName: "berlin424", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 13, 1, 128}},
{Region: "DE Frankfurt", ServerName: "frankfurt402", TCP: false, UDP: true, PortForward: true, IP: net.IP{195, 181, 170, 229}},
{Region: "DE Frankfurt", ServerName: "frankfurt402", TCP: true, UDP: false, PortForward: true, IP: net.IP{195, 181, 170, 226}},
{Region: "DE Frankfurt", ServerName: "frankfurt405", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 57, 53}},
{Region: "DE Frankfurt", ServerName: "frankfurt405", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 57, 10}},
{Region: "DE Frankfurt", ServerName: "frankfurt406", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 57, 113}},
{Region: "DE Frankfurt", ServerName: "frankfurt406", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 57, 90}},
{Region: "DE Frankfurt", ServerName: "frankfurt407", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 18, 155}},
{Region: "DE Frankfurt", ServerName: "frankfurt407", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 18, 185}},
{Region: "DE Frankfurt", ServerName: "frankfurt408", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 18, 65}},
{Region: "DE Frankfurt", ServerName: "frankfurt408", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 18, 68}},
{Region: "Denmark", ServerName: "copenhagen402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 126, 94, 78}},
{Region: "Denmark", ServerName: "copenhagen402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 126, 94, 69}},
{Region: "Denmark", ServerName: "copenhagen403", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 126, 94, 105}},
{Region: "Denmark", ServerName: "copenhagen403", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 126, 94, 106}},
{Region: "Denmark", ServerName: "copenhagen404", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 126, 94, 163}},
{Region: "Denmark", ServerName: "copenhagen405", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 126, 94, 49}},
{Region: "Denmark", ServerName: "copenhagen405", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 126, 94, 55}},
{Region: "Egypt", ServerName: "cairo401", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 214, 122, 107}},
{Region: "Egypt", ServerName: "cairo402", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 214, 122, 124}},
{Region: "Estonia", ServerName: "talinn401", TCP: true, UDP: true, PortForward: true, IP: net.IP{77, 247, 111, 135}},
{Region: "Estonia", ServerName: "talinn402", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 153, 31, 74}},
{Region: "Estonia", ServerName: "talinn402", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 153, 31, 75}},
{Region: "Finland", ServerName: "helsinki401", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 126, 89, 28}},
{Region: "Finland", ServerName: "helsinki401", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 126, 89, 18}},
{Region: "Finland", ServerName: "helsinki402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 126, 89, 47}},
{Region: "Finland", ServerName: "helsinki402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 126, 89, 54}},
{Region: "Finland", ServerName: "helsinki404", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 126, 89, 94}},
{Region: "France", ServerName: "paris403", TCP: true, UDP: false, PortForward: true, IP: net.IP{84, 17, 60, 210}},
{Region: "France", ServerName: "paris403", TCP: false, UDP: true, PortForward: true, IP: net.IP{84, 17, 60, 217}},
{Region: "France", ServerName: "paris404", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 63, 16}},
{Region: "France", ServerName: "paris404", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 63, 28}},
{Region: "France", ServerName: "paris405", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 63, 70}},
{Region: "France", ServerName: "paris405", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 63, 76}},
{Region: "France", ServerName: "paris407", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 57, 204}},
{Region: "France", ServerName: "paris407", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 57, 214}},
{Region: "France", ServerName: "paris408", TCP: true, UDP: true, PortForward: true, IP: net.IP{138, 199, 27, 147}},
{Region: "Georgia", ServerName: "georgia403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 236, 6}},
{Region: "Georgia", ServerName: "georgia403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 236, 5}},
{Region: "Greece", ServerName: "athens401", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 57, 3, 83}},
{Region: "Greece", ServerName: "athens401", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 57, 3, 84}},
{Region: "Greece", ServerName: "athens402", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 57, 3, 96}},
{Region: "Greece", ServerName: "athens402", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 57, 3, 103}},
{Region: "Greenland", ServerName: "greenland403", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 120, 134}},
{Region: "Greenland", ServerName: "greenland403", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 120, 140}},
{Region: "Greenland", ServerName: "greenland404", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 120, 156}},
{Region: "Greenland", ServerName: "greenland404", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 120, 146}},
{Region: "Greenland", ServerName: "greenland405", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 120, 163}},
{Region: "Greenland", ServerName: "greenland405", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 120, 167}},
{Region: "Greenland", ServerName: "greenland406", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 120, 187}},
{Region: "Greenland", ServerName: "greenland406", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 120, 180}},
{Region: "Hong Kong", ServerName: "china403", TCP: true, UDP: true, PortForward: true, IP: net.IP{86, 107, 104, 220}},
{Region: "Hong Kong", ServerName: "hongkong402", TCP: true, UDP: false, PortForward: true, IP: net.IP{86, 107, 104, 229}},
{Region: "Hong Kong", ServerName: "hongkong402", TCP: false, UDP: true, PortForward: true, IP: net.IP{86, 107, 104, 248}},
{Region: "Hong Kong", ServerName: "hongkong403", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 219, 213, 20}},
{Region: "Hong Kong", ServerName: "hongkong403", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 219, 213, 14}},
{Region: "Hungary", ServerName: "budapest401", TCP: true, UDP: false, PortForward: true, IP: net.IP{217, 138, 192, 218}},
{Region: "Hungary", ServerName: "budapest401", TCP: false, UDP: true, PortForward: true, IP: net.IP{217, 138, 192, 222}},
{Region: "Hungary", ServerName: "budapest402", TCP: true, UDP: false, PortForward: true, IP: net.IP{86, 106, 74, 119}},
{Region: "Hungary", ServerName: "budapest402", TCP: false, UDP: true, PortForward: true, IP: net.IP{86, 106, 74, 125}},
{Region: "Iceland", ServerName: "reykjavik404", TCP: true, UDP: true, PortForward: true, IP: net.IP{45, 133, 193, 54}},
{Region: "India", ServerName: "mumbai401", TCP: true, UDP: true, PortForward: true, IP: net.IP{45, 120, 139, 34}},
{Region: "India", ServerName: "mumbai402", TCP: true, UDP: true, PortForward: true, IP: net.IP{45, 120, 139, 127}},
{Region: "India", ServerName: "mumbai403", TCP: false, UDP: true, PortForward: true, IP: net.IP{103, 150, 187, 5}},
{Region: "India", ServerName: "mumbai403", TCP: true, UDP: false, PortForward: true, IP: net.IP{103, 150, 187, 8}},
{Region: "India", ServerName: "mumbai407", TCP: true, UDP: false, PortForward: true, IP: net.IP{103, 150, 187, 26}},
{Region: "India", ServerName: "mumbai407", TCP: false, UDP: true, PortForward: true, IP: net.IP{103, 150, 187, 17}},
{Region: "Ireland", ServerName: "dublin404", TCP: true, UDP: false, PortForward: true, IP: net.IP{193, 56, 252, 19}},
{Region: "Ireland", ServerName: "dublin404", TCP: false, UDP: true, PortForward: true, IP: net.IP{193, 56, 252, 20}},
{Region: "Ireland", ServerName: "dublin406", TCP: true, UDP: false, PortForward: true, IP: net.IP{193, 56, 252, 216}},
{Region: "Ireland", ServerName: "dublin406", TCP: false, UDP: true, PortForward: true, IP: net.IP{193, 56, 252, 217}},
{Region: "Ireland", ServerName: "dublin407", TCP: true, UDP: false, PortForward: true, IP: net.IP{193, 56, 252, 236}},
{Region: "Ireland", ServerName: "dublin407", TCP: false, UDP: true, PortForward: true, IP: net.IP{193, 56, 252, 233}},
{Region: "Ireland", ServerName: "dublin409", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 241, 178, 46}},
{Region: "Ireland", ServerName: "dublin411", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 241, 178, 24}},
{Region: "Ireland", ServerName: "dublin411", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 241, 178, 20}},
{Region: "Isle of Man", ServerName: "douglas403", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 124, 16}},
{Region: "Isle of Man", ServerName: "douglas403", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 124, 8}},
{Region: "Israel", ServerName: "jerusalem402", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 77, 248, 27}},
{Region: "Israel", ServerName: "jerusalem402", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 77, 248, 23}},
{Region: "Israel", ServerName: "jerusalem404", TCP: true, UDP: true, PortForward: true, IP: net.IP{185, 77, 248, 64}},
{Region: "Israel", ServerName: "jerusalem405", TCP: true, UDP: true, PortForward: true, IP: net.IP{185, 77, 248, 66}},
{Region: "Israel", ServerName: "jerusalem406", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 77, 248, 85}},
{Region: "Israel", ServerName: "jerusalem406", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 77, 248, 83}},
{Region: "Israel", ServerName: "jerusalem407", TCP: true, UDP: true, PortForward: true, IP: net.IP{185, 77, 248, 100}},
{Region: "Italy", ServerName: "milano402", TCP: true, UDP: true, PortForward: true, IP: net.IP{156, 146, 41, 8}},
{Region: "Italy", ServerName: "milano403", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 41, 118}},
{Region: "Italy", ServerName: "milano403", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 41, 94}},
{Region: "Italy", ServerName: "milano404", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 41, 219}},
{Region: "Italy", ServerName: "milano404", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 54, 233}},
{Region: "JP Streaming Optimized", ServerName: "tokyo410", TCP: true, UDP: true, PortForward: true, IP: net.IP{138, 199, 39, 3}},
{Region: "JP Tokyo", ServerName: "tokyo401", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 34, 174}},
{Region: "JP Tokyo", ServerName: "tokyo401", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 34, 189}},
{Region: "JP Tokyo", ServerName: "tokyo402", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 34, 73}},
{Region: "JP Tokyo", ServerName: "tokyo402", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 34, 85}},
{Region: "JP Tokyo", ServerName: "tokyo403", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 34, 50}},
{Region: "JP Tokyo", ServerName: "tokyo403", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 34, 29}},
{Region: "Kazakhstan", ServerName: "kazakhstan403", TCP: true, UDP: false, PortForward: true, IP: net.IP{62, 133, 47, 13}},
{Region: "Kazakhstan", ServerName: "kazakhstan403", TCP: false, UDP: true, PortForward: true, IP: net.IP{62, 133, 47, 4}},
{Region: "Latvia", ServerName: "riga401", TCP: true, UDP: false, PortForward: true, IP: net.IP{109, 248, 149, 3}},
{Region: "Latvia", ServerName: "riga401", TCP: false, UDP: true, PortForward: true, IP: net.IP{109, 248, 149, 4}},
{Region: "Latvia", ServerName: "riga402", TCP: false, UDP: true, PortForward: true, IP: net.IP{46, 183, 218, 136}},
{Region: "Latvia", ServerName: "riga402", TCP: true, UDP: false, PortForward: true, IP: net.IP{46, 183, 218, 132}},
{Region: "Latvia", ServerName: "riga403", TCP: false, UDP: true, PortForward: true, IP: net.IP{46, 183, 218, 148}},
{Region: "Latvia", ServerName: "riga403", TCP: true, UDP: false, PortForward: true, IP: net.IP{46, 183, 218, 150}},
{Region: "Liechtenstein", ServerName: "liechtenstein403", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 122, 14}},
{Region: "Liechtenstein", ServerName: "liechtenstein403", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 122, 7}},
{Region: "Lithuania", ServerName: "vilnius401", TCP: false, UDP: true, PortForward: true, IP: net.IP{85, 206, 165, 162}},
{Region: "Lithuania", ServerName: "vilnius401", TCP: true, UDP: false, PortForward: true, IP: net.IP{85, 206, 165, 163}},
{Region: "Lithuania", ServerName: "vilnius402", TCP: true, UDP: false, PortForward: true, IP: net.IP{85, 206, 165, 99}},
{Region: "Lithuania", ServerName: "vilnius402", TCP: false, UDP: true, PortForward: true, IP: net.IP{85, 206, 165, 100}},
{Region: "Lithuania", ServerName: "vilnius403", TCP: true, UDP: false, PortForward: true, IP: net.IP{85, 206, 165, 125}},
{Region: "Lithuania", ServerName: "vilnius403", TCP: false, UDP: true, PortForward: true, IP: net.IP{85, 206, 165, 118}},
{Region: "Luxembourg", ServerName: "luxembourg404", TCP: false, UDP: true, PortForward: true, IP: net.IP{5, 253, 204, 107}},
{Region: "Luxembourg", ServerName: "luxembourg404", TCP: true, UDP: false, PortForward: true, IP: net.IP{5, 253, 204, 104}},
{Region: "Luxembourg", ServerName: "luxembourg405", TCP: true, UDP: false, PortForward: true, IP: net.IP{5, 253, 204, 120}},
{Region: "Luxembourg", ServerName: "luxembourg405", TCP: false, UDP: true, PortForward: true, IP: net.IP{5, 253, 204, 124}},
{Region: "Luxembourg", ServerName: "luxembourg406", TCP: true, UDP: true, PortForward: true, IP: net.IP{5, 253, 204, 140}},
{Region: "Luxembourg", ServerName: "luxembourg407", TCP: false, UDP: true, PortForward: true, IP: net.IP{5, 253, 204, 156}},
{Region: "Luxembourg", ServerName: "luxembourg407", TCP: true, UDP: false, PortForward: true, IP: net.IP{5, 253, 204, 147}},
{Region: "Macao", ServerName: "macau403", TCP: false, UDP: true, PortForward: true, IP: net.IP{84, 252, 92, 8}},
{Region: "Macao", ServerName: "macau403", TCP: true, UDP: false, PortForward: true, IP: net.IP{84, 252, 92, 14}},
{Region: "Macedonia", ServerName: "macedonia401", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 225, 28, 125}},
{Region: "Macedonia", ServerName: "macedonia401", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 225, 28, 119}},
{Region: "Macedonia", ServerName: "macedonia402", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 225, 28, 134}},
{Region: "Macedonia", ServerName: "macedonia402", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 225, 28, 140}},
{Region: "Malta", ServerName: "malta403", TCP: false, UDP: true, PortForward: true, IP: net.IP{176, 125, 230, 8}},
{Region: "Malta", ServerName: "malta403", TCP: true, UDP: false, PortForward: true, IP: net.IP{176, 125, 230, 15}},
{Region: "Mexico", ServerName: "mexico403", TCP: true, UDP: true, PortForward: true, IP: net.IP{77, 81, 142, 15}},
{Region: "Mexico", ServerName: "mexico404", TCP: true, UDP: false, PortForward: true, IP: net.IP{77, 81, 142, 28}},
{Region: "Mexico", ServerName: "mexico404", TCP: false, UDP: true, PortForward: true, IP: net.IP{77, 81, 142, 18}},
{Region: "Mexico", ServerName: "mexico406", TCP: true, UDP: false, PortForward: true, IP: net.IP{77, 81, 142, 50}},
{Region: "Mexico", ServerName: "mexico406", TCP: false, UDP: true, PortForward: true, IP: net.IP{77, 81, 142, 54}},
{Region: "Mexico", ServerName: "mexico408", TCP: false, UDP: true, PortForward: true, IP: net.IP{77, 81, 142, 78}},
{Region: "Mexico", ServerName: "mexico408", TCP: true, UDP: false, PortForward: true, IP: net.IP{77, 81, 142, 89}},
{Region: "Mexico", ServerName: "mexico411", TCP: false, UDP: true, PortForward: true, IP: net.IP{77, 81, 142, 125}},
{Region: "Mexico", ServerName: "mexico411", TCP: true, UDP: false, PortForward: true, IP: net.IP{77, 81, 142, 120}},
{Region: "Moldova", ServerName: "chisinau401", TCP: true, UDP: true, PortForward: true, IP: net.IP{178, 175, 129, 39}},
{Region: "Moldova", ServerName: "chisinau402", TCP: false, UDP: true, PortForward: true, IP: net.IP{178, 175, 128, 40}},
{Region: "Moldova", ServerName: "chisinau402", TCP: true, UDP: false, PortForward: true, IP: net.IP{178, 175, 128, 39}},
{Region: "Monaco", ServerName: "monaco403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 233, 5}},
{Region: "Monaco", ServerName: "monaco403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 233, 8}},
{Region: "Mongolia", ServerName: "mongolia403", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 253, 163, 7}},
{Region: "Mongolia", ServerName: "mongolia403", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 253, 163, 3}},
{Region: "Mongolia", ServerName: "mongolia404", TCP: true, UDP: false, PortForward: true, IP: net.IP{185, 253, 163, 23}},
{Region: "Mongolia", ServerName: "mongolia404", TCP: false, UDP: true, PortForward: true, IP: net.IP{185, 253, 163, 17}},
{Region: "Montenegro", ServerName: "montenegro403", TCP: false, UDP: true, PortForward: true, IP: net.IP{176, 125, 229, 7}},
{Region: "Montenegro", ServerName: "montenegro403", TCP: true, UDP: false, PortForward: true, IP: net.IP{176, 125, 229, 4}},
{Region: "Morocco", ServerName: "morocco403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 232, 4}},
{Region: "Morocco", ServerName: "morocco403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 232, 3}},
{Region: "Netherlands", ServerName: "amsterdam402", TCP: true, UDP: true, PortForward: true, IP: net.IP{212, 102, 35, 96}},
{Region: "Netherlands", ServerName: "amsterdam404", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 41, 174}},
{Region: "Netherlands", ServerName: "amsterdam404", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 41, 134}},
{Region: "Netherlands", ServerName: "amsterdam412", TCP: true, UDP: true, PortForward: true, IP: net.IP{143, 244, 41, 190}},
{Region: "Netherlands", ServerName: "amsterdam419", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 40, 195}},
{Region: "Netherlands", ServerName: "amsterdam419", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 40, 225}},
{Region: "Netherlands", ServerName: "amsterdam420", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 41, 10}},
{Region: "Netherlands", ServerName: "amsterdam420", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 41, 55}},
{Region: "New Zealand", ServerName: "newzealand403", TCP: true, UDP: true, PortForward: true, IP: net.IP{179, 61, 240, 38}},
{Region: "New Zealand", ServerName: "newzealand404", TCP: true, UDP: false, PortForward: true, IP: net.IP{179, 61, 240, 106}},
{Region: "New Zealand", ServerName: "newzealand404", TCP: false, UDP: true, PortForward: true, IP: net.IP{179, 61, 240, 104}},
{Region: "New Zealand", ServerName: "newzealand405", TCP: false, UDP: true, PortForward: true, IP: net.IP{179, 61, 240, 134}},
{Region: "New Zealand", ServerName: "newzealand405", TCP: true, UDP: false, PortForward: true, IP: net.IP{179, 61, 240, 185}},
{Region: "Nigeria", ServerName: "nigeria404", TCP: true, UDP: false, PortForward: true, IP: net.IP{102, 165, 25, 118}},
{Region: "Nigeria", ServerName: "nigeria404", TCP: false, UDP: true, PortForward: true, IP: net.IP{102, 165, 25, 124}},
{Region: "Norway", ServerName: "oslo401", TCP: true, UDP: true, PortForward: true, IP: net.IP{46, 246, 122, 45}},
{Region: "Norway", ServerName: "oslo402", TCP: true, UDP: true, PortForward: true, IP: net.IP{46, 246, 122, 81}},
{Region: "Norway", ServerName: "oslo403", TCP: false, UDP: true, PortForward: true, IP: net.IP{46, 246, 122, 123}},
{Region: "Norway", ServerName: "oslo403", TCP: true, UDP: false, PortForward: true, IP: net.IP{46, 246, 122, 126}},
{Region: "Norway", ServerName: "oslo404", TCP: true, UDP: false, PortForward: true, IP: net.IP{46, 246, 122, 189}},
{Region: "Norway", ServerName: "oslo404", TCP: false, UDP: true, PortForward: true, IP: net.IP{46, 246, 122, 188}},
{Region: "Panama", ServerName: "panama403", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 126, 14}},
{Region: "Panama", ServerName: "panama403", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 126, 19}},
{Region: "Panama", ServerName: "panama404", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 126, 32}},
{Region: "Panama", ServerName: "panama404", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 126, 33}},
{Region: "Panama", ServerName: "panama405", TCP: true, UDP: false, PortForward: true, IP: net.IP{91, 90, 126, 46}},
{Region: "Panama", ServerName: "panama405", TCP: false, UDP: true, PortForward: true, IP: net.IP{91, 90, 126, 36}},
{Region: "Philippines", ServerName: "philippines401", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 214, 125, 134}},
{Region: "Philippines", ServerName: "philippines402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 214, 125, 158}},
{Region: "Philippines", ServerName: "philippines402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 214, 125, 155}},
{Region: "Poland", ServerName: "warsaw402", TCP: true, UDP: true, PortForward: true, IP: net.IP{194, 110, 114, 14}},
{Region: "Poland", ServerName: "warsaw405", TCP: false, UDP: true, PortForward: true, IP: net.IP{194, 110, 114, 50}},
{Region: "Poland", ServerName: "warsaw405", TCP: true, UDP: false, PortForward: true, IP: net.IP{194, 110, 114, 55}},
{Region: "Poland", ServerName: "warsaw406", TCP: true, UDP: true, PortForward: true, IP: net.IP{194, 110, 114, 74}},
{Region: "Poland", ServerName: "warsaw409", TCP: true, UDP: false, PortForward: true, IP: net.IP{194, 110, 114, 120}},
{Region: "Poland", ServerName: "warsaw409", TCP: false, UDP: true, PortForward: true, IP: net.IP{194, 110, 114, 118}},
{Region: "Poland", ServerName: "warsaw410", TCP: true, UDP: true, PortForward: true, IP: net.IP{138, 199, 59, 45}},
{Region: "Portugal", ServerName: "lisbon401", TCP: false, UDP: true, PortForward: true, IP: net.IP{89, 26, 241, 85}},
{Region: "Portugal", ServerName: "lisbon401", TCP: true, UDP: false, PortForward: true, IP: net.IP{89, 26, 241, 84}},
{Region: "Portugal", ServerName: "lisbon402", TCP: false, UDP: true, PortForward: true, IP: net.IP{89, 26, 241, 96}},
{Region: "Portugal", ServerName: "lisbon402", TCP: true, UDP: false, PortForward: true, IP: net.IP{89, 26, 241, 98}},
{Region: "Portugal", ServerName: "lisbon403", TCP: true, UDP: true, PortForward: true, IP: net.IP{89, 26, 241, 141}},
{Region: "Portugal", ServerName: "lisbon404", TCP: true, UDP: false, PortForward: true, IP: net.IP{89, 26, 241, 110}},
{Region: "Portugal", ServerName: "lisbon404", TCP: false, UDP: true, PortForward: true, IP: net.IP{89, 26, 241, 107}},
{Region: "Qatar", ServerName: "qatar403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 234, 13}},
{Region: "Qatar", ServerName: "qatar403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 234, 3}},
{Region: "Romania", ServerName: "romania406", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 52, 9}},
{Region: "Romania", ServerName: "romania406", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 52, 49}},
{Region: "Romania", ServerName: "romania407", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 54, 153}},
{Region: "Romania", ServerName: "romania407", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 54, 173}},
{Region: "Romania", ServerName: "romania408", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 54, 79}},
{Region: "Romania", ServerName: "romania408", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 54, 109}},
{Region: "Romania", ServerName: "romania409", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 54, 44}},
{Region: "Romania", ServerName: "romania409", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 54, 14}},
{Region: "Saudi Arabia", ServerName: "saudiarabia403", TCP: true, UDP: true, PortForward: true, IP: net.IP{95, 181, 235, 17}},
{Region: "Serbia", ServerName: "belgrade401", TCP: false, UDP: true, PortForward: true, IP: net.IP{37, 120, 193, 244}},
{Region: "Serbia", ServerName: "belgrade401", TCP: true, UDP: false, PortForward: true, IP: net.IP{37, 120, 193, 243}},
{Region: "Serbia", ServerName: "belgrade402", TCP: false, UDP: true, PortForward: true, IP: net.IP{37, 120, 193, 236}},
{Region: "Serbia", ServerName: "belgrade402", TCP: true, UDP: false, PortForward: true, IP: net.IP{37, 120, 193, 233}},
{Region: "Singapore", ServerName: "singapore401", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 57, 229}},
{Region: "Singapore", ServerName: "singapore401", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 57, 184}},
{Region: "Singapore", ServerName: "singapore402", TCP: true, UDP: true, PortForward: true, IP: net.IP{156, 146, 57, 120}},
{Region: "Singapore", ServerName: "singapore403", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 57, 69}},
{Region: "Singapore", ServerName: "singapore403", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 57, 47}},
{Region: "Slovakia", ServerName: "bratislava401", TCP: true, UDP: true, PortForward: true, IP: net.IP{37, 120, 221, 85}},
{Region: "Slovakia", ServerName: "bratislava402", TCP: false, UDP: true, PortForward: true, IP: net.IP{37, 120, 221, 222}},
{Region: "Slovakia", ServerName: "bratislava402", TCP: true, UDP: false, PortForward: true, IP: net.IP{37, 120, 221, 221}},
{Region: "South Africa", ServerName: "johannesburg401", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 16, 93, 38}},
{Region: "South Africa", ServerName: "johannesburg401", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 16, 93, 40}},
{Region: "South Africa", ServerName: "johannesburg402", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 16, 93, 205}},
{Region: "South Africa", ServerName: "johannesburg402", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 16, 93, 199}},
{Region: "South Africa", ServerName: "johannesburg403", TCP: true, UDP: false, PortForward: true, IP: net.IP{154, 16, 93, 237}},
{Region: "South Africa", ServerName: "johannesburg403", TCP: false, UDP: true, PortForward: true, IP: net.IP{154, 16, 93, 235}},
{Region: "Spain", ServerName: "madrid401", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 49, 113}},
{Region: "Spain", ServerName: "madrid401", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 49, 116}},
{Region: "Spain", ServerName: "madrid402", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 49, 60}},
{Region: "Spain", ServerName: "madrid402", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 49, 17}},
{Region: "Spain", ServerName: "madrid403", TCP: true, UDP: true, PortForward: true, IP: net.IP{212, 102, 49, 208}},
{Region: "Spain", ServerName: "madrid404", TCP: true, UDP: true, PortForward: true, IP: net.IP{212, 102, 49, 145}},
{Region: "Sri Lanka", ServerName: "srilanka403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 239, 10}},
{Region: "Sri Lanka", ServerName: "srilanka403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 239, 13}},
{Region: "Sweden", ServerName: "stockholm401", TCP: false, UDP: true, PortForward: true, IP: net.IP{195, 246, 120, 6}},
{Region: "Sweden", ServerName: "stockholm401", TCP: true, UDP: false, PortForward: true, IP: net.IP{195, 246, 120, 27}},
{Region: "Sweden", ServerName: "stockholm402", TCP: true, UDP: false, PortForward: true, IP: net.IP{195, 246, 120, 49}},
{Region: "Sweden", ServerName: "stockholm402", TCP: false, UDP: true, PortForward: true, IP: net.IP{195, 246, 120, 69}},
{Region: "Sweden", ServerName: "stockholm403", TCP: true, UDP: true, PortForward: true, IP: net.IP{195, 246, 120, 85}},
{Region: "Sweden", ServerName: "stockholm404", TCP: true, UDP: false, PortForward: true, IP: net.IP{195, 246, 120, 134}},
{Region: "Sweden", ServerName: "stockholm404", TCP: false, UDP: true, PortForward: true, IP: net.IP{195, 246, 120, 129}},
{Region: "Sweden", ServerName: "stockholm405", TCP: true, UDP: false, PortForward: true, IP: net.IP{46, 246, 3, 199}},
{Region: "Sweden", ServerName: "stockholm405", TCP: false, UDP: true, PortForward: true, IP: net.IP{46, 246, 3, 209}},
{Region: "Switzerland", ServerName: "zurich402", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 37, 238}},
{Region: "Switzerland", ServerName: "zurich402", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 37, 215}},
{Region: "Switzerland", ServerName: "zurich403", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 37, 155}},
{Region: "Switzerland", ServerName: "zurich403", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 37, 165}},
{Region: "Switzerland", ServerName: "zurich404", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 37, 56}},
{Region: "Switzerland", ServerName: "zurich404", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 37, 70}},
{Region: "Switzerland", ServerName: "zurich405", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 36, 15}},
{Region: "Switzerland", ServerName: "zurich405", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 36, 20}},
{Region: "Switzerland", ServerName: "zurich406", TCP: true, UDP: false, PortForward: true, IP: net.IP{156, 146, 62, 190}},
{Region: "Switzerland", ServerName: "zurich406", TCP: false, UDP: true, PortForward: true, IP: net.IP{156, 146, 62, 134}},
{Region: "Taiwan", ServerName: "taiwan401", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 214, 106, 75}},
{Region: "Taiwan", ServerName: "taiwan401", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 214, 106, 78}},
{Region: "Taiwan", ServerName: "taiwan402", TCP: true, UDP: true, PortForward: true, IP: net.IP{188, 214, 106, 88}},
{Region: "Taiwan", ServerName: "taiwan403", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 214, 106, 150}},
{Region: "Taiwan", ServerName: "taiwan403", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 214, 106, 147}},
{Region: "Turkey", ServerName: "istanbul401", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 213, 34, 69}},
{Region: "Turkey", ServerName: "istanbul401", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 213, 34, 67}},
{Region: "UK London", ServerName: "london404", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 52, 106}},
{Region: "UK London", ServerName: "london404", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 52, 98}},
{Region: "UK London", ServerName: "london408", TCP: true, UDP: false, PortForward: true, IP: net.IP{194, 110, 13, 19}},
{Region: "UK London", ServerName: "london408", TCP: false, UDP: true, PortForward: true, IP: net.IP{194, 110, 13, 4}},
{Region: "UK London", ServerName: "london409", TCP: true, UDP: false, PortForward: true, IP: net.IP{181, 215, 176, 53}},
{Region: "UK London", ServerName: "london409", TCP: false, UDP: true, PortForward: true, IP: net.IP{181, 215, 176, 39}},
{Region: "UK London", ServerName: "london413", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 29, 46}},
{Region: "UK London", ServerName: "london413", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 29, 38}},
{Region: "UK London", ServerName: "london434", TCP: true, UDP: false, PortForward: true, IP: net.IP{194, 110, 13, 67}},
{Region: "UK London", ServerName: "london434", TCP: false, UDP: true, PortForward: true, IP: net.IP{194, 110, 13, 68}},
{Region: "UK Manchester", ServerName: "manchester419", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 172, 14}},
{Region: "UK Manchester", ServerName: "manchester419", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 172, 6}},
{Region: "UK Manchester", ServerName: "manchester420", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 172, 64}},
{Region: "UK Manchester", ServerName: "manchester420", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 172, 59}},
{Region: "UK Manchester", ServerName: "manchester421", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 172, 81}},
{Region: "UK Manchester", ServerName: "manchester421", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 172, 88}},
{Region: "UK Manchester", ServerName: "manchester426", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 172, 232}},
{Region: "UK Manchester", ServerName: "manchester426", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 172, 230}},
{Region: "UK Manchester", ServerName: "manchester427", TCP: false, UDP: true, PortForward: true, IP: net.IP{45, 133, 173, 15}},
{Region: "UK Manchester", ServerName: "manchester427", TCP: true, UDP: false, PortForward: true, IP: net.IP{45, 133, 173, 14}},
{Region: "UK Southampton", ServerName: "southampton401", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 37, 246}},
{Region: "UK Southampton", ServerName: "southampton401", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 37, 236}},
{Region: "UK Southampton", ServerName: "southampton403", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 37, 97}},
{Region: "UK Southampton", ServerName: "southampton403", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 37, 108}},
{Region: "UK Southampton", ServerName: "southampton404", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 37, 37}},
{Region: "UK Southampton", ServerName: "southampton404", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 37, 54}},
{Region: "UK Southampton", ServerName: "southampton405", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 36, 69}},
{Region: "UK Southampton", ServerName: "southampton405", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 36, 65}},
{Region: "UK Southampton", ServerName: "southampton407", TCP: false, UDP: true, PortForward: true, IP: net.IP{143, 244, 38, 56}},
{Region: "UK Southampton", ServerName: "southampton407", TCP: true, UDP: false, PortForward: true, IP: net.IP{143, 244, 38, 53}},
{Region: "UK Streaming Optimized", ServerName: "london419", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 28, 4}},
{Region: "UK Streaming Optimized", ServerName: "london419", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 28, 7}},
{Region: "UK Streaming Optimized", ServerName: "london425", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 30, 138}},
{Region: "UK Streaming Optimized", ServerName: "london425", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 30, 139}},
{Region: "UK Streaming Optimized", ServerName: "london430", TCP: false, UDP: true, PortForward: true, IP: net.IP{138, 199, 29, 146}},
{Region: "UK Streaming Optimized", ServerName: "london430", TCP: true, UDP: false, PortForward: true, IP: net.IP{138, 199, 29, 142}},
{Region: "UK Streaming Optimized", ServerName: "london431", TCP: true, UDP: true, PortForward: true, IP: net.IP{138, 199, 29, 154}},
{Region: "UK Streaming Optimized", ServerName: "southampton409", TCP: false, UDP: true, PortForward: true, IP: net.IP{212, 102, 52, 5}},
{Region: "UK Streaming Optimized", ServerName: "southampton409", TCP: true, UDP: false, PortForward: true, IP: net.IP{212, 102, 52, 6}},
{Region: "US Atlanta", ServerName: "atlanta413", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 22, 79}},
{Region: "US Atlanta", ServerName: "atlanta413", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 22, 70}},
{Region: "US Atlanta", ServerName: "atlanta415", TCP: true, UDP: true, PortForward: false, IP: net.IP{154, 21, 22, 147}},
{Region: "US Atlanta", ServerName: "atlanta417", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 22, 213}},
{Region: "US Atlanta", ServerName: "atlanta417", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 22, 214}},
{Region: "US Atlanta", ServerName: "atlanta418", TCP: true, UDP: true, PortForward: false, IP: net.IP{154, 21, 22, 230}},
{Region: "US Atlanta", ServerName: "atlanta419", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 21, 24}},
{Region: "US Atlanta", ServerName: "atlanta419", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 21, 16}},
{Region: "US California", ServerName: "losangeles403", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 49, 98}},
{Region: "US California", ServerName: "losangeles403", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 49, 117}},
{Region: "US California", ServerName: "losangeles404", TCP: true, UDP: false, PortForward: false, IP: net.IP{84, 17, 45, 9}},
{Region: "US California", ServerName: "losangeles404", TCP: false, UDP: true, PortForward: false, IP: net.IP{84, 17, 45, 25}},
{Region: "US California", ServerName: "losangeles405", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 50, 40}},
{Region: "US California", ServerName: "losangeles405", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 50, 53}},
{Region: "US California", ServerName: "losangeles409", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 49, 159}},
{Region: "US California", ServerName: "losangeles409", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 49, 135}},
{Region: "US California", ServerName: "losangeles418", TCP: false, UDP: true, PortForward: false, IP: net.IP{138, 199, 8, 118}},
{Region: "US California", ServerName: "losangeles418", TCP: true, UDP: false, PortForward: false, IP: net.IP{138, 199, 8, 108}},
{Region: "US Chicago", ServerName: "chicago403", TCP: true, UDP: false, PortForward: false, IP: net.IP{212, 102, 59, 153}},
{Region: "US Chicago", ServerName: "chicago403", TCP: false, UDP: true, PortForward: false, IP: net.IP{212, 102, 59, 144}},
{Region: "US Chicago", ServerName: "chicago404", TCP: false, UDP: true, PortForward: false, IP: net.IP{212, 102, 59, 190}},
{Region: "US Chicago", ServerName: "chicago404", TCP: true, UDP: false, PortForward: false, IP: net.IP{212, 102, 59, 166}},
{Region: "US Chicago", ServerName: "chicago405", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 28, 43}},
{Region: "US Chicago", ServerName: "chicago405", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 28, 37}},
{Region: "US Chicago", ServerName: "chicago409", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 28, 173}},
{Region: "US Chicago", ServerName: "chicago409", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 28, 167}},
{Region: "US Chicago", ServerName: "chicago416", TCP: true, UDP: true, PortForward: false, IP: net.IP{154, 21, 114, 49}},
{Region: "US Denver", ServerName: "denver401", TCP: true, UDP: false, PortForward: false, IP: net.IP{70, 39, 81, 143}},
{Region: "US Denver", ServerName: "denver401", TCP: false, UDP: true, PortForward: false, IP: net.IP{70, 39, 81, 163}},
{Region: "US Denver", ServerName: "denver403", TCP: true, UDP: true, PortForward: false, IP: net.IP{70, 39, 116, 214}},
{Region: "US Denver", ServerName: "denver404", TCP: true, UDP: false, PortForward: false, IP: net.IP{70, 39, 111, 236}},
{Region: "US Denver", ServerName: "denver404", TCP: false, UDP: true, PortForward: false, IP: net.IP{70, 39, 111, 254}},
{Region: "US Denver", ServerName: "denver405", TCP: true, UDP: false, PortForward: false, IP: net.IP{70, 39, 110, 115}},
{Region: "US Denver", ServerName: "denver405", TCP: false, UDP: true, PortForward: false, IP: net.IP{70, 39, 110, 84}},
{Region: "US Denver", ServerName: "denver409", TCP: true, UDP: false, PortForward: false, IP: net.IP{70, 39, 113, 235}},
{Region: "US Denver", ServerName: "denver409", TCP: false, UDP: true, PortForward: false, IP: net.IP{70, 39, 113, 224}},
{Region: "US East", ServerName: "newjersey404", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 46, 40}},
{Region: "US East", ServerName: "newjersey404", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 46, 53}},
{Region: "US East", ServerName: "newjersey405", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 46, 77}},
{Region: "US East", ServerName: "newjersey405", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 46, 80}},
{Region: "US East", ServerName: "newjersey409", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 45, 38}},
{Region: "US East", ServerName: "newjersey409", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 45, 5}},
{Region: "US East", ServerName: "newjersey416", TCP: true, UDP: true, PortForward: false, IP: net.IP{143, 244, 46, 155}},
{Region: "US East", ServerName: "newjersey418", TCP: true, UDP: true, PortForward: false, IP: net.IP{37, 19, 197, 205}},
{Region: "US Florida", ServerName: "miami404", TCP: true, UDP: true, PortForward: false, IP: net.IP{143, 244, 34, 177}},
{Region: "US Florida", ServerName: "miami407", TCP: true, UDP: false, PortForward: false, IP: net.IP{156, 146, 42, 107}},
{Region: "US Florida", ServerName: "miami407", TCP: false, UDP: true, PortForward: false, IP: net.IP{156, 146, 42, 78}},
{Region: "US Florida", ServerName: "miami409", TCP: true, UDP: false, PortForward: false, IP: net.IP{156, 146, 42, 215}},
{Region: "US Florida", ServerName: "miami409", TCP: false, UDP: true, PortForward: false, IP: net.IP{156, 146, 42, 203}},
{Region: "US Florida", ServerName: "miami415", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 35, 27}},
{Region: "US Florida", ServerName: "miami415", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 35, 19}},
{Region: "US Florida", ServerName: "miami416", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 35, 70}},
{Region: "US Florida", ServerName: "miami416", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 35, 108}},
{Region: "US Houston", ServerName: "houston419", TCP: false, UDP: true, PortForward: false, IP: net.IP{191, 96, 67, 8}},
{Region: "US Houston", ServerName: "houston419", TCP: true, UDP: false, PortForward: false, IP: net.IP{191, 96, 67, 25}},
{Region: "US Houston", ServerName: "houston422", TCP: false, UDP: true, PortForward: false, IP: net.IP{191, 96, 67, 113}},
{Region: "US Houston", ServerName: "houston422", TCP: true, UDP: false, PortForward: false, IP: net.IP{191, 96, 67, 96}},
{Region: "US Houston", ServerName: "houston424", TCP: true, UDP: false, PortForward: false, IP: net.IP{191, 96, 67, 167}},
{Region: "US Houston", ServerName: "houston424", TCP: false, UDP: true, PortForward: false, IP: net.IP{191, 96, 67, 165}},
{Region: "US Houston", ServerName: "houston425", TCP: true, UDP: false, PortForward: false, IP: net.IP{191, 96, 67, 208}},
{Region: "US Houston", ServerName: "houston425", TCP: false, UDP: true, PortForward: false, IP: net.IP{191, 96, 67, 204}},
{Region: "US Houston", ServerName: "houston427", TCP: true, UDP: false, PortForward: false, IP: net.IP{181, 214, 227, 24}},
{Region: "US Houston", ServerName: "houston427", TCP: false, UDP: true, PortForward: false, IP: net.IP{181, 214, 227, 19}},
{Region: "US Las Vegas", ServerName: "lasvegas406", TCP: true, UDP: false, PortForward: false, IP: net.IP{82, 102, 31, 184}},
{Region: "US Las Vegas", ServerName: "lasvegas406", TCP: false, UDP: true, PortForward: false, IP: net.IP{82, 102, 31, 179}},
{Region: "US Las Vegas", ServerName: "lasvegas426", TCP: true, UDP: true, PortForward: false, IP: net.IP{173, 239, 226, 130}},
{Region: "US Las Vegas", ServerName: "lasvegas427", TCP: false, UDP: true, PortForward: false, IP: net.IP{173, 239, 226, 208}},
{Region: "US Las Vegas", ServerName: "lasvegas427", TCP: true, UDP: false, PortForward: false, IP: net.IP{173, 239, 226, 205}},
{Region: "US Las Vegas", ServerName: "losangeles407", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 48, 184}},
{Region: "US Las Vegas", ServerName: "losangeles407", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 48, 179}},
{Region: "US Las Vegas", ServerName: "losangeles408", TCP: true, UDP: false, PortForward: false, IP: net.IP{143, 244, 48, 213}},
{Region: "US Las Vegas", ServerName: "losangeles408", TCP: false, UDP: true, PortForward: false, IP: net.IP{143, 244, 48, 204}},
{Region: "US New York", ServerName: "newyork401", TCP: true, UDP: true, PortForward: false, IP: net.IP{156, 146, 54, 227}},
{Region: "US New York", ServerName: "newyork416", TCP: false, UDP: true, PortForward: false, IP: net.IP{156, 146, 58, 53}},
{Region: "US New York", ServerName: "newyork416", TCP: true, UDP: false, PortForward: false, IP: net.IP{156, 146, 58, 30}},
{Region: "US New York", ServerName: "newyork418", TCP: true, UDP: false, PortForward: false, IP: net.IP{138, 199, 13, 203}},
{Region: "US New York", ServerName: "newyork418", TCP: false, UDP: true, PortForward: false, IP: net.IP{138, 199, 13, 198}},
{Region: "US New York", ServerName: "newyork420", TCP: false, UDP: true, PortForward: false, IP: net.IP{138, 199, 10, 78}},
{Region: "US New York", ServerName: "newyork420", TCP: true, UDP: false, PortForward: false, IP: net.IP{138, 199, 10, 66}},
{Region: "US New York", ServerName: "newyork430", TCP: true, UDP: true, PortForward: false, IP: net.IP{37, 19, 198, 7}},
{Region: "US Seattle", ServerName: "seattle401", TCP: true, UDP: true, PortForward: false, IP: net.IP{156, 146, 48, 3}},
{Region: "US Seattle", ServerName: "seattle412", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 20, 24}},
{Region: "US Seattle", ServerName: "seattle412", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 20, 20}},
{Region: "US Seattle", ServerName: "seattle422", TCP: true, UDP: false, PortForward: false, IP: net.IP{156, 146, 48, 244}},
{Region: "US Seattle", ServerName: "seattle422", TCP: false, UDP: true, PortForward: false, IP: net.IP{156, 146, 48, 204}},
{Region: "US Seattle", ServerName: "seattle423", TCP: false, UDP: true, PortForward: false, IP: net.IP{156, 146, 48, 190}},
{Region: "US Seattle", ServerName: "seattle423", TCP: true, UDP: false, PortForward: false, IP: net.IP{156, 146, 48, 177}},
{Region: "US Seattle", ServerName: "seattle424", TCP: false, UDP: true, PortForward: false, IP: net.IP{212, 102, 47, 196}},
{Region: "US Seattle", ServerName: "seattle424", TCP: true, UDP: false, PortForward: false, IP: net.IP{212, 102, 47, 195}},
{Region: "US Silicon Valley", ServerName: "siliconvalley402", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 212, 67}},
{Region: "US Silicon Valley", ServerName: "siliconvalley402", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 212, 79}},
{Region: "US Silicon Valley", ServerName: "siliconvalley414", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 216, 34}},
{Region: "US Silicon Valley", ServerName: "siliconvalley414", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 216, 35}},
{Region: "US Silicon Valley", ServerName: "siliconvalley417", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 21, 216, 159}},
{Region: "US Silicon Valley", ServerName: "siliconvalley417", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 21, 216, 178}},
{Region: "US Silicon Valley", ServerName: "siliconvalley420", TCP: false, UDP: true, PortForward: false, IP: net.IP{66, 115, 165, 117}},
{Region: "US Silicon Valley", ServerName: "siliconvalley420", TCP: true, UDP: false, PortForward: false, IP: net.IP{66, 115, 165, 78}},
{Region: "US Silicon Valley", ServerName: "siliconvalley421", TCP: false, UDP: true, PortForward: false, IP: net.IP{66, 115, 165, 146}},
{Region: "US Silicon Valley", ServerName: "siliconvalley421", TCP: true, UDP: false, PortForward: false, IP: net.IP{66, 115, 165, 187}},
{Region: "US Texas", ServerName: "dallas406", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 3, 251, 136}},
{Region: "US Texas", ServerName: "dallas406", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 3, 251, 110}},
{Region: "US Texas", ServerName: "dallas411", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 29, 131, 83}},
{Region: "US Texas", ServerName: "dallas411", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 29, 131, 77}},
{Region: "US Texas", ServerName: "dallas412", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 29, 131, 138}},
{Region: "US Texas", ServerName: "dallas412", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 29, 131, 100}},
{Region: "US Texas", ServerName: "dallas417", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 3, 250, 123}},
{Region: "US Texas", ServerName: "dallas417", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 3, 250, 129}},
{Region: "US Texas", ServerName: "dallas418", TCP: true, UDP: true, PortForward: false, IP: net.IP{154, 3, 250, 179}},
{Region: "US Washington DC", ServerName: "washington432", TCP: false, UDP: true, PortForward: false, IP: net.IP{154, 3, 44, 23}},
{Region: "US Washington DC", ServerName: "washington432", TCP: true, UDP: false, PortForward: false, IP: net.IP{154, 3, 44, 25}},
{Region: "US Washington DC", ServerName: "washington442", TCP: true, UDP: true, PortForward: false, IP: net.IP{38, 70, 11, 69}},
{Region: "US Washington DC", ServerName: "washington443", TCP: false, UDP: true, PortForward: false, IP: net.IP{38, 70, 11, 125}},
{Region: "US Washington DC", ServerName: "washington443", TCP: true, UDP: false, PortForward: false, IP: net.IP{38, 70, 11, 100}},
{Region: "US Washington DC", ServerName: "washington451", TCP: true, UDP: false, PortForward: false, IP: net.IP{91, 149, 244, 67}},
{Region: "US Washington DC", ServerName: "washington451", TCP: false, UDP: true, PortForward: false, IP: net.IP{91, 149, 244, 83}},
{Region: "US Washington DC", ServerName: "washington454", TCP: false, UDP: true, PortForward: false, IP: net.IP{91, 149, 244, 199}},
{Region: "US Washington DC", ServerName: "washington454", TCP: true, UDP: false, PortForward: false, IP: net.IP{91, 149, 244, 198}},
{Region: "US West", ServerName: "phoenix407", TCP: true, UDP: false, PortForward: false, IP: net.IP{184, 170, 241, 103}},
{Region: "US West", ServerName: "phoenix407", TCP: false, UDP: true, PortForward: false, IP: net.IP{184, 170, 241, 98}},
{Region: "US West", ServerName: "phoenix408", TCP: true, UDP: false, PortForward: false, IP: net.IP{172, 98, 87, 247}},
{Region: "US West", ServerName: "phoenix408", TCP: false, UDP: true, PortForward: false, IP: net.IP{172, 98, 87, 233}},
{Region: "US West", ServerName: "phoenix410", TCP: true, UDP: false, PortForward: false, IP: net.IP{184, 170, 252, 158}},
{Region: "US West", ServerName: "phoenix410", TCP: false, UDP: true, PortForward: false, IP: net.IP{184, 170, 252, 147}},
{Region: "US West", ServerName: "phoenix414", TCP: false, UDP: true, PortForward: false, IP: net.IP{184, 170, 242, 189}},
{Region: "US West", ServerName: "phoenix414", TCP: true, UDP: false, PortForward: false, IP: net.IP{184, 170, 242, 156}},
{Region: "US West", ServerName: "phoenix415", TCP: false, UDP: true, PortForward: false, IP: net.IP{184, 170, 242, 23}},
{Region: "US West", ServerName: "phoenix415", TCP: true, UDP: false, PortForward: false, IP: net.IP{184, 170, 242, 223}},
{Region: "Ukraine", ServerName: "kiev401", TCP: false, UDP: true, PortForward: true, IP: net.IP{62, 149, 20, 58}},
{Region: "Ukraine", ServerName: "kiev401", TCP: true, UDP: false, PortForward: true, IP: net.IP{62, 149, 20, 55}},
{Region: "Ukraine", ServerName: "kiev402", TCP: true, UDP: false, PortForward: true, IP: net.IP{62, 149, 20, 19}},
{Region: "Ukraine", ServerName: "kiev402", TCP: false, UDP: true, PortForward: true, IP: net.IP{62, 149, 20, 23}},
{Region: "Ukraine", ServerName: "kiev403", TCP: true, UDP: true, PortForward: true, IP: net.IP{62, 149, 20, 5}},
{Region: "Ukraine", ServerName: "kiev404", TCP: false, UDP: true, PortForward: true, IP: net.IP{62, 149, 20, 36}},
{Region: "Ukraine", ServerName: "kiev404", TCP: true, UDP: false, PortForward: true, IP: net.IP{62, 149, 20, 46}},
{Region: "United Arab Emirates", ServerName: "dubai403", TCP: true, UDP: false, PortForward: true, IP: net.IP{217, 138, 193, 156}},
{Region: "United Arab Emirates", ServerName: "dubai403", TCP: false, UDP: true, PortForward: true, IP: net.IP{217, 138, 193, 154}},
{Region: "United Arab Emirates", ServerName: "dubai404", TCP: true, UDP: true, PortForward: true, IP: net.IP{217, 138, 193, 164}},
{Region: "Venezuela", ServerName: "venezuela403", TCP: true, UDP: false, PortForward: true, IP: net.IP{95, 181, 237, 10}},
{Region: "Venezuela", ServerName: "venezuela403", TCP: false, UDP: true, PortForward: true, IP: net.IP{95, 181, 237, 9}},
{Region: "Venezuela", ServerName: "venezuela404", TCP: true, UDP: true, PortForward: true, IP: net.IP{95, 181, 237, 17}},
{Region: "Vietnam", ServerName: "vietnam401", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 214, 152, 73}},
{Region: "Vietnam", ServerName: "vietnam401", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 214, 152, 69}},
{Region: "Vietnam", ServerName: "vietnam402", TCP: true, UDP: false, PortForward: true, IP: net.IP{188, 214, 152, 84}},
{Region: "Vietnam", ServerName: "vietnam402", TCP: false, UDP: true, PortForward: true, IP: net.IP{188, 214, 152, 89}},
}
}

View File

@@ -0,0 +1,258 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
PrivadoCertificate = "MIIFKDCCAxCgAwIBAgIJAMtrmqZxIV/OMA0GCSqGSIb3DQEBDQUAMBIxEDAOBgNVBAMMB1ByaXZhZG8wHhcNMjAwMTA4MjEyODQ1WhcNMzUwMTA5MjEyODQ1WjASMRAwDgYDVQQDDAdQcml2YWRvMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxPwOgiwNJzZTnKIXwAB0TSu/Lu2qt2U2I8obtQjwhi/7OrfmbmYykSdro70al2XPhnwAGGdCxW6LDnp0UN/IOhD11mgBPo14f5CLkBQjSJ6VN5miPbvK746LsNZl9H8rQGvDuPo4CG9BfPZMiDRGlsMxij/jztzgT1gmuxQ7WHfFRcNzBas1dHa9hV/d3TU6/t47x4SE/ljdcCtJiu7Zn6ODKQoys3mB7Luz2ngqUJWvkqsg+E4+3eJ0M8Hlbn5TPaRJBID7DAdYo6Vs6xGCYr981ThFcmoIQ10js10yANrrfGAzd03b3TnLAgko0uQMHjliMZL6L8sWOPHxyxJI0us88SFh4UgcFyRHKHPKux7w24SxAlZUYoUcTHp9VjG5XvDKYxzgV2RdM4ulBGbQRQ3y3/CyddsyQYMvA55Ets0LfPaBvDIcct70iXijGsdvlX1du3ArGpG7Vaje/RU4nbbGT6HYRdt5YyZfof288ukMOSj20nVcmS+c/4tqsxSerRb1aq5LOi1IemSkTMeC5gCbexk+L1vl7NT/58sxjGmu5bXwnvev/lIItfi2AlITrfUSEv19iDMKkeshwn/+sFJBMWYyluP+yJ56yR+MWoXvLlSWphLDTqq19yx3BZn0P1tgbXoR0g8PTdJFcz8z3RIb7myVLYulV1oGG/3rka0CAwEAAaOBgDB+MB0GA1UdDgQWBBTFtJkZCVDuDAD6k5bJzefjJdO3DTBCBgNVHSMEOzA5gBTFtJkZCVDuDAD6k5bJzefjJdO3DaEWpBQwEjEQMA4GA1UEAwwHUHJpdmFkb4IJAMtrmqZxIV/OMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBDQUAA4ICAQB7MUSXMeBb9wlSv4sUaT1JHEwE26nlBw+TKmezfuPU5pBlY0LYr6qQZY95DHqsRJ7ByUzGUrGo17dNGXlcuNc6TAaQQEDRPo6y+LVh2TWMk15TUMI+MkqryJtCret7xGvDigKYMJgBy58HN3RAVr1B7cL9youwzLgc2Y/NcFKvnQJKeiIYAJ7g0CcnJiQvgZTS7xdwkEBXfsngmUCIG320DLPEL+Ze0HiUrxwWljMRya6i40AeH3Zu2i532xX1wV5+cjA4RJWIKg6ri/Q54iFGtZrA9/nc6y9uoQHkmz8cGyVUmJxFzMrrIICVqUtVRxLhkTMe4UzwRWTBeGgtW4tS0yq1QonAKfOyjgRw/CeY55D2UGvnAFZdTadtYXS4Alu2P9zdwoEk3fzHiVmDjqfJVr5wz9383aABUFrPI3nz6ed/Z6LZflKh1k+DUDEp8NxU4klUULWsSOKoa5zGX51G8cdHxwQLImXvtGuN5eSR8jCTgxFZhdps/xes4KkyfIz9FMYG748M+uOTgKITf4zdJ9BAyiQaOufVQZ8WjhWzWk9YHec9VqPkzpWNGkVjiRI5ewuXwZzZ164tMv2hikBXSuUCnFz37/ZNwGlDi0oBdDszCk2GxccdFHHaCSmpjU5MrdJ+5IhtTKGeTx+US2hTIVHQFIO99DmacxSYvLNcSQ=="
)
func PrivadoHostnameChoices() (choices []string) {
servers := PrivadoServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Hostname
}
return makeUnique(choices)
}
func PrivadoServers() []models.PrivadoServer {
return []models.PrivadoServer{
{Hostname: "akl-004.vpn.privado.io", IP: net.IP{103, 76, 164, 99}},
{Hostname: "akl-005.vpn.privado.io", IP: net.IP{103, 76, 164, 105}},
{Hostname: "ams-011.vpn.privado.io", IP: net.IP{91, 148, 228, 30}},
{Hostname: "ams-012.vpn.privado.io", IP: net.IP{91, 148, 228, 40}},
{Hostname: "ams-014.vpn.privado.io", IP: net.IP{91, 148, 228, 60}},
{Hostname: "arn-001.vpn.privado.io", IP: net.IP{86, 106, 103, 67}},
{Hostname: "arn-003.vpn.privado.io", IP: net.IP{86, 106, 103, 81}},
{Hostname: "arn-004.vpn.privado.io", IP: net.IP{86, 106, 103, 88}},
{Hostname: "ath-002.vpn.privado.io", IP: net.IP{188, 123, 126, 64}},
{Hostname: "ath-003.vpn.privado.io", IP: net.IP{188, 123, 126, 68}},
{Hostname: "beg-002.vpn.privado.io", IP: net.IP{89, 38, 224, 25}},
{Hostname: "ber-001.vpn.privado.io", IP: net.IP{89, 36, 76, 35}},
{Hostname: "ber-002.vpn.privado.io", IP: net.IP{89, 36, 76, 41}},
{Hostname: "bkk-001.vpn.privado.io", IP: net.IP{119, 59, 111, 3}},
{Hostname: "bom-001.vpn.privado.io", IP: net.IP{103, 26, 204, 61}},
{Hostname: "bom-002.vpn.privado.io", IP: net.IP{103, 26, 204, 70}},
{Hostname: "bru-002.vpn.privado.io", IP: net.IP{217, 138, 211, 170}},
{Hostname: "bru-003.vpn.privado.io", IP: net.IP{217, 138, 211, 177}},
{Hostname: "bts-001.vpn.privado.io", IP: net.IP{37, 120, 221, 227}},
{Hostname: "bts-002.vpn.privado.io", IP: net.IP{37, 120, 221, 233}},
{Hostname: "bud-002.vpn.privado.io", IP: net.IP{185, 128, 26, 200}},
{Hostname: "cdg-001.vpn.privado.io", IP: net.IP{89, 40, 183, 99}},
{Hostname: "cdg-004.vpn.privado.io", IP: net.IP{89, 40, 183, 114}},
{Hostname: "cph-001.vpn.privado.io", IP: net.IP{2, 58, 46, 35}},
{Hostname: "cph-002.vpn.privado.io", IP: net.IP{2, 58, 46, 42}},
{Hostname: "cph-003.vpn.privado.io", IP: net.IP{2, 58, 46, 49}},
{Hostname: "cph-004.vpn.privado.io", IP: net.IP{2, 58, 46, 56}},
{Hostname: "dca-002.vpn.privado.io", IP: net.IP{85, 12, 61, 20}},
{Hostname: "dca-003.vpn.privado.io", IP: net.IP{85, 12, 61, 30}},
{Hostname: "dca-005.vpn.privado.io", IP: net.IP{85, 12, 61, 50}},
{Hostname: "dca-006.vpn.privado.io", IP: net.IP{85, 12, 61, 60}},
{Hostname: "dca-007.vpn.privado.io", IP: net.IP{85, 12, 61, 70}},
{Hostname: "dca-008.vpn.privado.io", IP: net.IP{85, 12, 61, 80}},
{Hostname: "dca-009.vpn.privado.io", IP: net.IP{85, 12, 61, 90}},
{Hostname: "dca-010.vpn.privado.io", IP: net.IP{85, 12, 61, 100}},
{Hostname: "dca-011.vpn.privado.io", IP: net.IP{85, 12, 61, 110}},
{Hostname: "dca-012.vpn.privado.io", IP: net.IP{85, 12, 61, 120}},
{Hostname: "dca-013.vpn.privado.io", IP: net.IP{185, 247, 68, 3}},
{Hostname: "dfw-003.vpn.privado.io", IP: net.IP{172, 241, 25, 157}},
{Hostname: "dfw-005.vpn.privado.io", IP: net.IP{172, 241, 25, 161}},
{Hostname: "dfw-008.vpn.privado.io", IP: net.IP{172, 241, 25, 167}},
{Hostname: "dfw-009.vpn.privado.io", IP: net.IP{172, 241, 25, 169}},
{Hostname: "dfw-010.vpn.privado.io", IP: net.IP{172, 241, 25, 171}},
{Hostname: "dfw-012.vpn.privado.io", IP: net.IP{172, 241, 25, 175}},
{Hostname: "dfw-013.vpn.privado.io", IP: net.IP{172, 241, 25, 177}},
{Hostname: "dfw-015.vpn.privado.io", IP: net.IP{172, 241, 25, 181}},
{Hostname: "dfw-016.vpn.privado.io", IP: net.IP{172, 241, 25, 183}},
{Hostname: "dfw-017.vpn.privado.io", IP: net.IP{172, 241, 25, 185}},
{Hostname: "dfw-018.vpn.privado.io", IP: net.IP{172, 241, 30, 65}},
{Hostname: "dfw-020.vpn.privado.io", IP: net.IP{172, 241, 30, 69}},
{Hostname: "dfw-021.vpn.privado.io", IP: net.IP{172, 241, 30, 71}},
{Hostname: "dfw-022.vpn.privado.io", IP: net.IP{172, 241, 30, 73}},
{Hostname: "dfw-023.vpn.privado.io", IP: net.IP{172, 241, 30, 75}},
{Hostname: "dfw-025.vpn.privado.io", IP: net.IP{172, 241, 30, 79}},
{Hostname: "dfw-026.vpn.privado.io", IP: net.IP{172, 241, 30, 81}},
{Hostname: "dfw-027.vpn.privado.io", IP: net.IP{172, 241, 30, 83}},
{Hostname: "dfw-028.vpn.privado.io", IP: net.IP{172, 241, 30, 85}},
{Hostname: "dfw-030.vpn.privado.io", IP: net.IP{172, 241, 30, 89}},
{Hostname: "dfw-032.vpn.privado.io", IP: net.IP{172, 241, 30, 93}},
{Hostname: "dub-002.vpn.privado.io", IP: net.IP{84, 247, 48, 234}},
{Hostname: "dub-003.vpn.privado.io", IP: net.IP{84, 247, 48, 241}},
{Hostname: "dub-004.vpn.privado.io", IP: net.IP{84, 247, 48, 248}},
{Hostname: "eze-001.vpn.privado.io", IP: net.IP{168, 205, 93, 211}},
{Hostname: "fra-002.vpn.privado.io", IP: net.IP{91, 148, 232, 20}},
{Hostname: "fra-003.vpn.privado.io", IP: net.IP{91, 148, 232, 30}},
{Hostname: "fra-004.vpn.privado.io", IP: net.IP{91, 148, 232, 40}},
{Hostname: "fra-008.vpn.privado.io", IP: net.IP{91, 148, 233, 10}},
{Hostname: "gru-001.vpn.privado.io", IP: net.IP{177, 54, 145, 193}},
{Hostname: "hkg-001.vpn.privado.io", IP: net.IP{209, 58, 185, 88}},
{Hostname: "hkg-002.vpn.privado.io", IP: net.IP{209, 58, 185, 97}},
{Hostname: "iev-002.vpn.privado.io", IP: net.IP{176, 103, 53, 40}},
{Hostname: "ist-001.vpn.privado.io", IP: net.IP{185, 84, 183, 3}},
{Hostname: "jfk-002.vpn.privado.io", IP: net.IP{217, 138, 208, 106}},
{Hostname: "jfk-003.vpn.privado.io", IP: net.IP{217, 138, 208, 113}},
{Hostname: "jfk-005.vpn.privado.io", IP: net.IP{37, 120, 244, 3}},
{Hostname: "jfk-006.vpn.privado.io", IP: net.IP{37, 120, 244, 10}},
{Hostname: "jfk-007.vpn.privado.io", IP: net.IP{37, 120, 244, 17}},
{Hostname: "jfk-009.vpn.privado.io", IP: net.IP{23, 19, 225, 65}},
{Hostname: "jfk-010.vpn.privado.io", IP: net.IP{23, 19, 225, 67}},
{Hostname: "jfk-015.vpn.privado.io", IP: net.IP{23, 19, 225, 77}},
{Hostname: "jfk-016.vpn.privado.io", IP: net.IP{23, 19, 225, 79}},
{Hostname: "jfk-019.vpn.privado.io", IP: net.IP{23, 19, 225, 85}},
{Hostname: "jfk-020.vpn.privado.io", IP: net.IP{23, 19, 225, 87}},
{Hostname: "jfk-021.vpn.privado.io", IP: net.IP{23, 19, 225, 89}},
{Hostname: "jfk-026.vpn.privado.io", IP: net.IP{23, 19, 225, 99}},
{Hostname: "jfk-027.vpn.privado.io", IP: net.IP{23, 19, 225, 101}},
{Hostname: "jfk-028.vpn.privado.io", IP: net.IP{23, 19, 225, 103}},
{Hostname: "jfk-029.vpn.privado.io", IP: net.IP{23, 19, 225, 105}},
{Hostname: "jfk-030.vpn.privado.io", IP: net.IP{23, 19, 225, 107}},
{Hostname: "jfk-031.vpn.privado.io", IP: net.IP{23, 19, 225, 109}},
{Hostname: "jfk-035.vpn.privado.io", IP: net.IP{23, 19, 225, 117}},
{Hostname: "jnb-001.vpn.privado.io", IP: net.IP{172, 107, 93, 131}},
{Hostname: "jrs-001.vpn.privado.io", IP: net.IP{31, 168, 251, 131}},
{Hostname: "kul-001.vpn.privado.io", IP: net.IP{103, 246, 112, 229}},
{Hostname: "kul-004.vpn.privado.io", IP: net.IP{103, 246, 112, 235}},
{Hostname: "kul-005.vpn.privado.io", IP: net.IP{103, 246, 112, 237}},
{Hostname: "kul-006.vpn.privado.io", IP: net.IP{103, 246, 112, 239}},
{Hostname: "kul-007.vpn.privado.io", IP: net.IP{103, 246, 112, 241}},
{Hostname: "kul-008.vpn.privado.io", IP: net.IP{103, 246, 112, 243}},
{Hostname: "kul-010.vpn.privado.io", IP: net.IP{103, 246, 112, 247}},
{Hostname: "kul-011.vpn.privado.io", IP: net.IP{103, 246, 112, 249}},
{Hostname: "lax-002.vpn.privado.io", IP: net.IP{81, 171, 62, 13}},
{Hostname: "lax-004.vpn.privado.io", IP: net.IP{81, 171, 62, 34}},
{Hostname: "lax-005.vpn.privado.io", IP: net.IP{81, 171, 62, 70}},
{Hostname: "lax-006.vpn.privado.io", IP: net.IP{81, 171, 62, 80}},
{Hostname: "lax-007.vpn.privado.io", IP: net.IP{81, 171, 62, 90}},
{Hostname: "lax-008.vpn.privado.io", IP: net.IP{81, 171, 62, 100}},
{Hostname: "lhr-003.vpn.privado.io", IP: net.IP{217, 138, 195, 173}},
{Hostname: "lhr-004.vpn.privado.io", IP: net.IP{217, 138, 195, 178}},
{Hostname: "lis-001.vpn.privado.io", IP: net.IP{89, 26, 243, 153}},
{Hostname: "lis-002.vpn.privado.io", IP: net.IP{89, 26, 243, 154}},
{Hostname: "mad-003.vpn.privado.io", IP: net.IP{217, 138, 218, 145}},
{Hostname: "mad-004.vpn.privado.io", IP: net.IP{217, 138, 218, 152}},
{Hostname: "man-001.vpn.privado.io", IP: net.IP{217, 138, 196, 131}},
{Hostname: "man-002.vpn.privado.io", IP: net.IP{217, 138, 196, 138}},
{Hostname: "man-004.vpn.privado.io", IP: net.IP{217, 138, 196, 152}},
{Hostname: "mex-002.vpn.privado.io", IP: net.IP{169, 57, 96, 57}},
{Hostname: "mex-003.vpn.privado.io", IP: net.IP{81, 171, 63, 3}},
{Hostname: "mex-005.vpn.privado.io", IP: net.IP{81, 171, 63, 23}},
{Hostname: "mex-006.vpn.privado.io", IP: net.IP{81, 171, 63, 33}},
{Hostname: "mex-008.vpn.privado.io", IP: net.IP{81, 171, 63, 54}},
{Hostname: "mex-009.vpn.privado.io", IP: net.IP{81, 171, 63, 64}},
{Hostname: "mex-010.vpn.privado.io", IP: net.IP{81, 171, 63, 74}},
{Hostname: "mia-003.vpn.privado.io", IP: net.IP{86, 106, 87, 141}},
{Hostname: "mxp-001.vpn.privado.io", IP: net.IP{89, 40, 182, 195}},
{Hostname: "mxp-002.vpn.privado.io", IP: net.IP{89, 40, 182, 201}},
{Hostname: "nrt-002.vpn.privado.io", IP: net.IP{217, 138, 252, 10}},
{Hostname: "nrt-003.vpn.privado.io", IP: net.IP{217, 138, 252, 17}},
{Hostname: "ord-004.vpn.privado.io", IP: net.IP{23, 254, 112, 138}},
{Hostname: "ord-007.vpn.privado.io", IP: net.IP{23, 108, 95, 203}},
{Hostname: "ord-012.vpn.privado.io", IP: net.IP{23, 108, 95, 230}},
{Hostname: "ord-014.vpn.privado.io", IP: net.IP{23, 108, 95, 234}},
{Hostname: "ord-015.vpn.privado.io", IP: net.IP{23, 108, 95, 236}},
{Hostname: "ord-016.vpn.privado.io", IP: net.IP{23, 108, 95, 238}},
{Hostname: "ord-017.vpn.privado.io", IP: net.IP{23, 108, 95, 240}},
{Hostname: "ord-024.vpn.privado.io", IP: net.IP{108, 62, 107, 160}},
{Hostname: "ord-027.vpn.privado.io", IP: net.IP{108, 62, 107, 166}},
{Hostname: "ord-029.vpn.privado.io", IP: net.IP{108, 62, 107, 170}},
{Hostname: "ord-030.vpn.privado.io", IP: net.IP{108, 62, 107, 172}},
{Hostname: "ord-031.vpn.privado.io", IP: net.IP{108, 62, 107, 174}},
{Hostname: "ord-032.vpn.privado.io", IP: net.IP{108, 62, 107, 176}},
{Hostname: "ord-033.vpn.privado.io", IP: net.IP{108, 62, 107, 178}},
{Hostname: "ord-035.vpn.privado.io", IP: net.IP{23, 82, 107, 65}},
{Hostname: "ord-038.vpn.privado.io", IP: net.IP{23, 82, 107, 71}},
{Hostname: "ord-042.vpn.privado.io", IP: net.IP{23, 82, 107, 79}},
{Hostname: "ord-044.vpn.privado.io", IP: net.IP{23, 82, 107, 83}},
{Hostname: "ord-045.vpn.privado.io", IP: net.IP{23, 82, 107, 85}},
{Hostname: "ord-046.vpn.privado.io", IP: net.IP{23, 82, 107, 87}},
{Hostname: "ord-047.vpn.privado.io", IP: net.IP{23, 82, 107, 89}},
{Hostname: "ord-048.vpn.privado.io", IP: net.IP{23, 82, 107, 91}},
{Hostname: "ord-050.vpn.privado.io", IP: net.IP{23, 82, 107, 95}},
{Hostname: "ord-051.vpn.privado.io", IP: net.IP{23, 82, 107, 97}},
{Hostname: "ord-053.vpn.privado.io", IP: net.IP{23, 82, 107, 101}},
{Hostname: "ord-055.vpn.privado.io", IP: net.IP{23, 82, 107, 105}},
{Hostname: "ord-056.vpn.privado.io", IP: net.IP{23, 82, 107, 107}},
{Hostname: "ord-057.vpn.privado.io", IP: net.IP{23, 82, 107, 109}},
{Hostname: "ord-058.vpn.privado.io", IP: net.IP{23, 82, 107, 111}},
{Hostname: "ord-060.vpn.privado.io", IP: net.IP{23, 82, 107, 115}},
{Hostname: "ord-061.vpn.privado.io", IP: net.IP{23, 82, 107, 117}},
{Hostname: "osl-003.vpn.privado.io", IP: net.IP{84, 247, 50, 123}},
{Hostname: "otp-002.vpn.privado.io", IP: net.IP{89, 46, 102, 185}},
{Hostname: "pdx-005.vpn.privado.io", IP: net.IP{104, 255, 228, 147}},
{Hostname: "pdx-006.vpn.privado.io", IP: net.IP{104, 255, 228, 151}},
{Hostname: "pdx-008.vpn.privado.io", IP: net.IP{104, 255, 228, 159}},
{Hostname: "pdx-010.vpn.privado.io", IP: net.IP{104, 255, 228, 167}},
{Hostname: "pdx-011.vpn.privado.io", IP: net.IP{104, 255, 228, 171}},
{Hostname: "pdx-012.vpn.privado.io", IP: net.IP{104, 255, 228, 175}},
{Hostname: "pdx-014.vpn.privado.io", IP: net.IP{104, 255, 228, 183}},
{Hostname: "pdx-016.vpn.privado.io", IP: net.IP{104, 255, 228, 195}},
{Hostname: "pdx-017.vpn.privado.io", IP: net.IP{104, 255, 228, 199}},
{Hostname: "pdx-019.vpn.privado.io", IP: net.IP{104, 255, 228, 207}},
{Hostname: "pdx-020.vpn.privado.io", IP: net.IP{104, 255, 228, 211}},
{Hostname: "pdx-022.vpn.privado.io", IP: net.IP{104, 255, 228, 219}},
{Hostname: "pdx-023.vpn.privado.io", IP: net.IP{104, 255, 228, 223}},
{Hostname: "pdx-024.vpn.privado.io", IP: net.IP{104, 255, 228, 227}},
{Hostname: "pdx-025.vpn.privado.io", IP: net.IP{104, 255, 228, 231}},
{Hostname: "pdx-026.vpn.privado.io", IP: net.IP{104, 255, 228, 235}},
{Hostname: "pdx-028.vpn.privado.io", IP: net.IP{104, 255, 228, 243}},
{Hostname: "pdx-030.vpn.privado.io", IP: net.IP{104, 255, 228, 251}},
{Hostname: "prg-002.vpn.privado.io", IP: net.IP{185, 216, 35, 105}},
{Hostname: "rix-001.vpn.privado.io", IP: net.IP{109, 248, 149, 35}},
{Hostname: "rix-002.vpn.privado.io", IP: net.IP{109, 248, 149, 40}},
{Hostname: "rkv-001.vpn.privado.io", IP: net.IP{82, 221, 131, 78}},
{Hostname: "sea-001.vpn.privado.io", IP: net.IP{23, 81, 208, 96}},
{Hostname: "sea-004.vpn.privado.io", IP: net.IP{23, 19, 87, 116}},
{Hostname: "sin-001.vpn.privado.io", IP: net.IP{92, 119, 178, 131}},
{Hostname: "sin-002.vpn.privado.io", IP: net.IP{92, 119, 178, 138}},
{Hostname: "sin-003.vpn.privado.io", IP: net.IP{92, 119, 178, 145}},
{Hostname: "sin-004.vpn.privado.io", IP: net.IP{92, 119, 178, 152}},
{Hostname: "sof-001.vpn.privado.io", IP: net.IP{217, 138, 221, 163}},
{Hostname: "stl-001.vpn.privado.io", IP: net.IP{148, 72, 170, 145}},
{Hostname: "syd-001.vpn.privado.io", IP: net.IP{93, 115, 35, 35}},
{Hostname: "syd-003.vpn.privado.io", IP: net.IP{93, 115, 35, 49}},
{Hostname: "syd-004.vpn.privado.io", IP: net.IP{93, 115, 35, 56}},
{Hostname: "vie-003.vpn.privado.io", IP: net.IP{5, 253, 207, 241}},
{Hostname: "vie-004.vpn.privado.io", IP: net.IP{5, 253, 207, 248}},
{Hostname: "vno-001.vpn.privado.io", IP: net.IP{185, 64, 104, 176}},
{Hostname: "vno-002.vpn.privado.io", IP: net.IP{185, 64, 104, 180}},
{Hostname: "waw-001.vpn.privado.io", IP: net.IP{217, 138, 209, 163}},
{Hostname: "waw-004.vpn.privado.io", IP: net.IP{217, 138, 209, 166}},
{Hostname: "waw-007.vpn.privado.io", IP: net.IP{146, 59, 31, 6}},
{Hostname: "waw-009.vpn.privado.io", IP: net.IP{146, 59, 31, 10}},
{Hostname: "waw-013.vpn.privado.io", IP: net.IP{146, 59, 31, 18}},
{Hostname: "waw-015.vpn.privado.io", IP: net.IP{146, 59, 31, 22}},
{Hostname: "waw-017.vpn.privado.io", IP: net.IP{146, 59, 31, 26}},
{Hostname: "waw-020.vpn.privado.io", IP: net.IP{146, 59, 31, 32}},
{Hostname: "waw-021.vpn.privado.io", IP: net.IP{146, 59, 31, 34}},
{Hostname: "waw-022.vpn.privado.io", IP: net.IP{146, 59, 31, 36}},
{Hostname: "waw-023.vpn.privado.io", IP: net.IP{146, 59, 31, 38}},
{Hostname: "waw-024.vpn.privado.io", IP: net.IP{146, 59, 31, 40}},
{Hostname: "waw-026.vpn.privado.io", IP: net.IP{146, 59, 31, 44}},
{Hostname: "waw-030.vpn.privado.io", IP: net.IP{146, 59, 31, 52}},
{Hostname: "waw-031.vpn.privado.io", IP: net.IP{146, 59, 31, 54}},
{Hostname: "waw-032.vpn.privado.io", IP: net.IP{146, 59, 31, 56}},
{Hostname: "waw-034.vpn.privado.io", IP: net.IP{146, 59, 31, 60}},
{Hostname: "waw-035.vpn.privado.io", IP: net.IP{146, 59, 31, 62}},
{Hostname: "waw-036.vpn.privado.io", IP: net.IP{146, 59, 31, 64}},
{Hostname: "waw-037.vpn.privado.io", IP: net.IP{146, 59, 31, 66}},
{Hostname: "waw-042.vpn.privado.io", IP: net.IP{146, 59, 31, 76}},
{Hostname: "waw-043.vpn.privado.io", IP: net.IP{146, 59, 31, 78}},
{Hostname: "waw-045.vpn.privado.io", IP: net.IP{146, 59, 31, 82}},
{Hostname: "waw-047.vpn.privado.io", IP: net.IP{146, 59, 31, 86}},
{Hostname: "waw-048.vpn.privado.io", IP: net.IP{146, 59, 31, 88}},
{Hostname: "waw-049.vpn.privado.io", IP: net.IP{146, 59, 31, 90}},
{Hostname: "waw-053.vpn.privado.io", IP: net.IP{146, 59, 31, 98}},
{Hostname: "waw-055.vpn.privado.io", IP: net.IP{146, 59, 31, 102}},
{Hostname: "waw-058.vpn.privado.io", IP: net.IP{146, 59, 31, 109}},
{Hostname: "yul-002.vpn.privado.io", IP: net.IP{217, 138, 213, 72}},
{Hostname: "yvr-001.vpn.privado.io", IP: net.IP{71, 19, 248, 57}},
{Hostname: "yyz-003.vpn.privado.io", IP: net.IP{199, 189, 27, 19}},
{Hostname: "zrh-002.vpn.privado.io", IP: net.IP{185, 156, 175, 202}},
{Hostname: "zrh-004.vpn.privado.io", IP: net.IP{185, 156, 175, 216}},
}
}

View File

@@ -0,0 +1,100 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
PrivatevpnCertificate = "MIIErTCCA5WgAwIBAgIJAPp3HmtYGCIOMA0GCSqGSIb3DQEBCwUAMIGVMQswCQYDVQQGEwJTRTELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVN0b2NraG9sbTETMBEGA1UEChMKUHJpdmF0ZVZQTjEWMBQGA1UEAxMNUHJpdmF0ZVZQTiBDQTETMBEGA1UEKRMKUHJpdmF0ZVZQTjEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBwcml2YXR2cG4uc2UwHhcNMTcwNTI0MjAxNTM3WhcNMjcwNTIyMjAxNTM3WjCBlTELMAkGA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VjM8EZ0/H2RZvLAVUnvPuUz2JfJhmiRkbeE75fVuqpAm9qdE+/7lg3oICYzxa6BJPxT+Imdjy3Q/FWdsXqX6aallhohPAZlMZgZL4eXECnV8rAfzyjOJggkMDZQt3Flc0Y4iDMfzrEhSOWMkNFBFwjK0F/dnhsX+fPX6GGRpUZgZcCt/hWvypqc05/SnrdKM/vV/jV/yZe0NVzY7S8Ur5g=="
PrivatevpnOpenvpnStaticKeyV1 = "a49082f082ca89d6a6bb4ecc7c047c6d428a1d3c8254a95206d38a61d7fbe65984214cd7d56eacc5a60803bffd677fa7294d4bfe555036339312de2dfb1335bd9d5fd94b04bba3a15fc5192aeb02fb6d8dd2ca831fad7509be5eefa8d1eaa689dc586c831a23b589c512662652ecf1bb3a4a673816aba434a04f6857b8c2f8bb265bfe48a7b8112539729d2f7d9734a720e1035188118c73fef1824d0237d5579ca382d703b4bb252acaedc753b12199f00154d3769efbcf85ef5ad6ee755cbeaa944cb98e7654286df54c793a8443f5363078e3da548ba0beed079df633283cefb256f6a4bcfc4ab2c4affc24955c1864d5458e84a7c210d0d186269e55dcf6"
)
func PrivatevpnCountryChoices() (choices []string) {
servers := PrivatevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Country
}
return makeChoicesUnique(choices)
}
func PrivatevpnCityChoices() (choices []string) {
servers := PrivatevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].City
}
return makeChoicesUnique(choices)
}
func PrivatevpnHostnameChoices() (choices []string) {
servers := PrivatevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Hostname
}
return makeChoicesUnique(choices)
}
//nolint:lll
// PrivatevpnServers returns a slice of all the server information for Privatevpn.
func PrivatevpnServers() []models.PrivatevpnServer {
return []models.PrivatevpnServer{
{Country: "Argentina", City: "Buenos Aires", Hostname: "ar-bue.pvdata.host", IPs: []net.IP{{181, 119, 160, 59}}},
{Country: "Australia", City: "Melbourne", Hostname: "au-mel.pvdata.host", IPs: []net.IP{{103, 231, 88, 203}}},
{Country: "Australia", City: "Sydney", Hostname: "au-syd.pvdata.host", IPs: []net.IP{{143, 244, 63, 96}}},
{Country: "Brazil", City: "Sao Paulo", Hostname: "br-sao.pvdata.host", IPs: []net.IP{{45, 162, 230, 59}}},
{Country: "Bulgaria", City: "Sofia", Hostname: "bg-sof.pvdata.host", IPs: []net.IP{{185, 94, 192, 163}}},
{Country: "Canada", City: "Montreal", Hostname: "ca-mon.pvdata.host", IPs: []net.IP{{37, 120, 237, 163}, {87, 101, 92, 131}}},
{Country: "Canada", City: "Vancouver", Hostname: "ca-van.pvdata.host", IPs: []net.IP{{74, 3, 160, 19}}},
{Country: "Chile", City: "Santiago", Hostname: "cl-san.pvdata.host", IPs: []net.IP{{216, 241, 14, 227}}},
{Country: "Colombia", City: "Bogot\xa0", Hostname: "ca-tor.pvdata.host", IPs: []net.IP{{45, 148, 7, 3}, {45, 148, 7, 6}, {45, 148, 7, 8}}},
{Country: "Costa Rica", City: "San Jose", Hostname: "cr-san.pvdata.host", IPs: []net.IP{{190, 10, 8, 218}}},
{Country: "Croatia", City: "Zagreb", Hostname: "hr-zag.pvdata.host", IPs: []net.IP{{85, 10, 56, 127}}},
{Country: "Cyprus", City: "Nicosia", Hostname: "cy-nic.pvdata.host", IPs: []net.IP{{185, 173, 226, 47}}},
{Country: "Czech Republic", City: "Prague", Hostname: "cz-pra.pvdata.host", IPs: []net.IP{{185, 156, 174, 179}}},
{Country: "Germany", City: "Frankfurt", Hostname: "de-fra.pvdata.host", IPs: []net.IP{{193, 180, 119, 130}, {193, 180, 119, 131}}},
{Country: "Germany", City: "Nuremberg", Hostname: "de-nur.pvdata.host", IPs: []net.IP{{185, 89, 36, 3}}},
{Country: "Greece", City: "Athens", Hostname: "gr-ath.pvdata.host", IPs: []net.IP{{154, 57, 3, 33}}},
{Country: "Iceland", City: "Reykjavik", Hostname: "is-rey.pvdata.host", IPs: []net.IP{{82, 221, 113, 210}}},
{Country: "Indonesia", City: "Jakarta", Hostname: "id-jak.pvdata.host", IPs: []net.IP{{23, 248, 170, 136}}},
{Country: "Ireland", City: "Dublin", Hostname: "ie-dub.pvdata.host", IPs: []net.IP{{217, 138, 222, 67}}},
{Country: "Isle of Man", City: "Ballasalla", Hostname: "im-bal.pvdata.host", IPs: []net.IP{{81, 27, 96, 89}}},
{Country: "Korea", City: "Seoul", Hostname: "kr-seo.pvdata.host", IPs: []net.IP{{92, 223, 73, 37}}},
{Country: "Latvia", City: "Riga", Hostname: "lv-rig.pvdata.host", IPs: []net.IP{{80, 233, 134, 165}}},
{Country: "Malaysia", City: "Kuala Lumpur", Hostname: "my-kua.pvdata.host", IPs: []net.IP{{128, 1, 160, 184}}},
{Country: "Malta", City: "Qormi", Hostname: "mt-qor.pvdata.host", IPs: []net.IP{{130, 185, 255, 25}}},
{Country: "Mexico", City: "Mexico City", Hostname: "mx-mex.pvdata.host", IPs: []net.IP{{190, 60, 16, 28}}},
{Country: "Moldova", City: "Chisinau", Hostname: "md-chi.pvdata.host", IPs: []net.IP{{178, 17, 172, 99}}},
{Country: "Netherlands", City: "Amsterdam", Hostname: "nl-ams.pvdata.host", IPs: []net.IP{{193, 180, 119, 194}, {193, 180, 119, 195}, {193, 180, 119, 196}, {193, 180, 119, 197}}},
{Country: "New Zealand", City: "Auckland", Hostname: "nz-auc.pvdata.host", IPs: []net.IP{{45, 252, 191, 34}}},
{Country: "Norway", City: "Oslo", Hostname: "no-osl.pvdata.host", IPs: []net.IP{{91, 205, 186, 26}}},
{Country: "Panama", City: "Panama City", Hostname: "pa-pan.pvdata.host", IPs: []net.IP{{200, 110, 155, 235}}},
{Country: "Philippines", City: "Manila", Hostname: "ph-man.pvdata.host", IPs: []net.IP{{128, 1, 209, 12}}},
{Country: "Portugal", City: "Lisbon", Hostname: "pt-lis.pvdata.host", IPs: []net.IP{{130, 185, 85, 107}}},
{Country: "Romania", City: "Bukarest", Hostname: "ro-buk.pvdata.host", IPs: []net.IP{{89, 40, 181, 203}}},
{Country: "Russian Federation", City: "Krasnoyarsk", Hostname: "ru-kra.pvdata.host", IPs: []net.IP{{92, 223, 87, 11}}},
{Country: "Russian Federation", City: "Moscow", Hostname: "ru-mos.pvdata.host", IPs: []net.IP{{92, 223, 103, 138}}},
{Country: "Serbia", City: "Belgrade", Hostname: "rs-bel.pvdata.host", IPs: []net.IP{{141, 98, 103, 166}}},
{Country: "Singapore", City: "Singapore", Hostname: "sg-sin.pvdata.host", IPs: []net.IP{{143, 244, 33, 81}}},
{Country: "South Africa", City: "Johannesburg", Hostname: "us-nyc.pvdata.host", IPs: []net.IP{{45, 130, 86, 3}, {45, 130, 86, 5}, {45, 130, 86, 8}, {45, 130, 86, 10}, {45, 130, 86, 12}}},
{Country: "Spain", City: "Madrid", Hostname: "es-mad.pvdata.host", IPs: []net.IP{{217, 212, 244, 92}, {217, 212, 244, 93}}},
{Country: "Sweden", City: "Gothenburg", Hostname: "se-got.pvdata.host", IPs: []net.IP{{193, 187, 91, 19}}},
{Country: "Sweden", City: "Kista", Hostname: "se-kis.pvdata.host", IPs: []net.IP{{193, 187, 88, 216}, {193, 187, 88, 217}, {193, 187, 88, 218}, {193, 187, 88, 219}, {193, 187, 88, 220}, {193, 187, 88, 221}, {193, 187, 88, 222}}},
{Country: "Sweden", City: "Stockholm", Hostname: "se-sto.pvdata.host", IPs: []net.IP{{45, 130, 87, 3}, {45, 130, 87, 5}, {193, 180, 119, 2}, {193, 180, 119, 3}, {193, 180, 119, 4}, {193, 180, 119, 5}, {193, 180, 119, 6}, {193, 180, 119, 7}}},
{Country: "Taiwan", City: "Taipei", Hostname: "tw-tai.pvdata.host", IPs: []net.IP{{2, 58, 241, 51}}},
{Country: "Ukraine", City: "Kiev", Hostname: "ua-kie.pvdata.host", IPs: []net.IP{{192, 121, 68, 131}}},
{Country: "United Arab Emirates", City: "Dubai", Hostname: "ae-dub.pvdata.host", IPs: []net.IP{{45, 9, 249, 59}}},
{Country: "United Kingdom", City: "Manchester", Hostname: "uk-man.pvdata.host", IPs: []net.IP{{185, 206, 227, 181}}},
{Country: "United States", City: "Buffalo", Hostname: "us-buf.pvdata.host", IPs: []net.IP{{172, 245, 13, 115}, {192, 210, 199, 35}}},
{Country: "United States", City: "Dallas", Hostname: "us-dal.pvdata.host", IPs: []net.IP{{89, 187, 164, 97}}},
{Country: "United States", City: "Las Vegas", Hostname: "us-las.pvdata.host", IPs: []net.IP{{82, 102, 30, 19}}},
{Country: "United States", City: "Los Angeles", Hostname: "us-los.pvdata.host", IPs: []net.IP{{89, 187, 185, 78}, {185, 152, 67, 132}}},
{Country: "United States", City: "Miami", Hostname: "us-mia.pvdata.host", IPs: []net.IP{{195, 181, 163, 139}}},
{Country: "United States", City: "Phoenix", Hostname: "us-pho.pvdata.host", IPs: []net.IP{{82, 102, 30, 131}}},
{Country: "Vietnam", City: "Ho Chi Minh City", Hostname: "vn-hoc.pvdata.host", IPs: []net.IP{{210, 2, 64, 5}}},
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
PurevpnCertificateAuthority = "MIIE6DCCA9CgAwIBAgIJAMjXFoeo5uSlMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYDVQQGEwJISzEQMA4GA1UECBMHQ2VudHJhbDELMAkGA1UEBxMCSEsxGDAWBgNVBAoTD1NlY3VyZS1TZXJ2ZXJDQTELMAkGA1UECxMCSVQxGDAWBgNVBAMTD1NlY3VyZS1TZXJ2ZXJDQTEYMBYGA1UEKRMPU2VjdXJlLVNlcnZlckNBMR8wHQYJKoZIhvcNAQkBFhBtYWlsQGhvc3QuZG9tYWluMB4XDTE2MDExNTE1MzQwOVoXDTI2MDExMjE1MzQwOVowgagxCzAJBgNVBAYTAkhLMRAwDgYDVQQIEwdDZW50cmFsMQswCQYDVQQHEwJISzEYMBYGA1UEChMPU2VjdXJlLVNlcnZlckNBMQswCQYDVQQLEwJJVDEYMBYGA1U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LY54KDrqOn55OzC70WYjWh4t5evkCQQDkkzZUAeskBC9+JP/zLps8jhwfoLBWGw/zbC9ePDmX0N8MTZdcUpg6KUTf1wbkLUyVtIRjS2ao6qu1jWG6K0x3AkEA3qPWyaWQWCynhNDqu2U1cPb2kh5AJip+gqxO3emikAdajsSxeoyEC2AfyBITbeB1tvCUZH17J4i/0+OFTEQp/wJAb/zEOGJ8PzghwK8GC7JA8mk51DEZVAaMSRovFv9wxDXcoh191AjPdmdzzCuAv9iF1i8MUc3GbWoUWK39PIYsPwJAWh63sqfx5b8tj/WBDpnJKBDPfhYAoXJSA1L8GZeY1fQkE+ZKcPCwAmrGcpXeh3t0Krj3WDXyw+32uC5Apr5wwQJAPZwOOReaC4YNfBPZN9BdHvVjOYGGUffpI+X+hWpLRnQFJteAi+eqwyk0Oi0SkJB+a7jcerK2d7q7xhec5WHlng=="
PurevpnOpenvpnStaticKeyV1 = "e30af995f56d07426d9ba1f824730521d4283db4b4d0cdda9c6e8759a3799dcb7939b6a5989160c9660de0f6125cbb1f585b41c074b2fe88ecfcf17eab9a33be1352379cdf74952b588fb161a93e13df9135b2b29038231e02d657a6225705e6868ccb0c384ed11614690a1894bfbeb274cebf1fe9c2329bdd5c8a40fe8820624d2ea7540cd79ab76892db51fc371a3ac5fc9573afecb3fffe3281e61d72e91579d9b03d8cbf7909b3aebf4d90850321ee6b7d0a7846d15c27d8290e031e951e19438a4654663cad975e138f5bc5af89c737ad822f27e19057731f41e1e254cc9c95b7175c622422cde9f1f2cfd3510add94498b4d7133d3729dd214a16b27fb"
)
func PurevpnRegionChoices() (choices []string) {
servers := PurevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Region
}
return makeUnique(choices)
}
func PurevpnCountryChoices() (choices []string) {
servers := PurevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Country
}
return makeUnique(choices)
}
func PurevpnCityChoices() (choices []string) {
servers := PurevpnServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].City
}
return makeUnique(choices)
}
//nolint:lll
// PurevpnServers returns a slice of all the server information for Purevpn.
func PurevpnServers() []models.PurevpnServer {
return []models.PurevpnServer{
{Country: "Australia", Region: "New South Wales", City: "Sydney", IPs: []net.IP{{43, 245, 161, 80}, {43, 245, 161, 82}}},
{Country: "Australia", Region: "Western Australia", City: "Perth", IPs: []net.IP{{43, 250, 205, 53}, {43, 250, 205, 54}, {43, 250, 205, 54}}},
{Country: "Austria", Region: "Vienna", City: "Vienna", IPs: []net.IP{{37, 120, 212, 218}, {37, 120, 212, 220}, {37, 120, 212, 221}, {172, 94, 109, 4}}},
{Country: "Belgium", Region: "Flanders", City: "Zaventem", IPs: []net.IP{{217, 138, 211, 86}, {217, 138, 211, 87}, {217, 138, 221, 117}, {217, 138, 221, 120}}},
{Country: "Brazil", Region: "São Paulo", City: "São Paulo", IPs: []net.IP{{181, 41, 201, 77}, {181, 41, 201, 82}, {181, 41, 201, 85}}},
{Country: "Canada", Region: "British Columbia", City: "Vancouver", IPs: []net.IP{{66, 115, 147, 37}, {66, 115, 147, 43}}},
{Country: "Canada", Region: "Ontario", City: "Toronto", IPs: []net.IP{{104, 200, 138, 178}, {104, 200, 138, 215}, {104, 200, 138, 217}, {104, 200, 138, 220}}},
{Country: "Czech Republic", Region: "Hlavní město Praha", City: "Prague", IPs: []net.IP{{217, 138, 199, 250}, {217, 138, 199, 252}}},
{Country: "France", Region: "Île-de-France", City: "Paris", IPs: []net.IP{{45, 152, 181, 68}, {172, 111, 219, 4}}},
{Country: "Germany", Region: "Hesse", City: "Frankfurt am Main", IPs: []net.IP{{2, 57, 18, 18}, {5, 254, 82, 51}, {5, 254, 88, 170}, {5, 254, 88, 174}, {199, 116, 116, 50}}},
{Country: "Hong Kong", Region: "Central and Western", City: "Hong Kong", IPs: []net.IP{{46, 243, 250, 4}, {128, 1, 209, 19}, {128, 1, 209, 54}}},
{Country: "Indonesia", Region: "Aceh", City: "Bireun", IPs: []net.IP{{169, 38, 97, 241}, {169, 38, 97, 242}, {169, 38, 129, 20}}},
{Country: "Italy", Region: "Lombardy", City: "Milan", IPs: []net.IP{{172, 111, 173, 3}}},
{Country: "Japan", Region: "Okinawa", City: "Hirara", IPs: []net.IP{{128, 1, 155, 178}}},
{Country: "Japan", Region: "Tokyo", City: "Tokyo", IPs: []net.IP{{185, 242, 4, 59}}},
{Country: "Korea", Region: "Seoul", City: "Seoul", IPs: []net.IP{{43, 226, 231, 4}, {43, 226, 231, 6}}},
{Country: "Malaysia", Region: "Kuala Lumpur", City: "Kuala Lumpur", IPs: []net.IP{{103, 28, 90, 32}, {103, 55, 10, 4}, {103, 55, 10, 133}}},
{Country: "Netherlands", Region: "North Holland", City: "Amsterdam", IPs: []net.IP{{104, 37, 6, 4}, {5, 254, 73, 172}, {92, 119, 179, 196}}},
{Country: "Norway", Region: "Oslo", City: "Oslo", IPs: []net.IP{{82, 102, 22, 212}}},
{Country: "Poland", Region: "Mazovia", City: "Warsaw", IPs: []net.IP{{5, 253, 206, 251}}},
{Country: "Portugal", Region: "Lisbon", City: "Lisbon", IPs: []net.IP{{5, 154, 174, 3}}},
{Country: "Russian Federation", Region: "St.-Petersburg", City: "Saint Petersburg", IPs: []net.IP{{94, 242, 54, 23}, {206, 123, 139, 4}}},
{Country: "Singapore", Region: "Singapore", City: "Singapore", IPs: []net.IP{{192, 253, 249, 132}, {37, 120, 208, 147}}},
{Country: "South Africa", Region: "Gauteng", City: "Johannesburg", IPs: []net.IP{{102, 165, 3, 34}}},
{Country: "Sweden", Region: "Stockholm", City: "Stockholm", IPs: []net.IP{{45, 12, 220, 122}, {45, 12, 220, 126}, {86, 106, 103, 183}, {86, 106, 103, 185}, {86, 106, 103, 186}}},
{Country: "Switzerland", Region: "Zurich", City: "Zürich", IPs: []net.IP{{45, 12, 222, 100}, {45, 12, 222, 104}, {45, 12, 222, 106}, {45, 12, 222, 107}}},
{Country: "United Kingdom", Region: "England", City: "London", IPs: []net.IP{{193, 9, 113, 66}, {193, 9, 113, 66}}},
{Country: "United States", Region: "California", City: "Los Angeles", IPs: []net.IP{{104, 243, 243, 131}, {172, 94, 26, 4}, {172, 94, 26, 4}, {172, 94, 72, 4}}},
{Country: "United States", Region: "Florida", City: "Miami", IPs: []net.IP{{5, 254, 79, 114}, {5, 254, 79, 115}}},
{Country: "United States", Region: "Georgia", City: "Atlanta", IPs: []net.IP{{141, 101, 168, 4}}},
{Country: "United States", Region: "New Jersey", City: "Harrison", IPs: []net.IP{{172, 111, 149, 4}}},
{Country: "United States", Region: "New York", City: "New York City", IPs: []net.IP{{172, 94, 72, 4}, {172, 94, 72, 4}}},
{Country: "United States", Region: "Texas", City: "Dallas", IPs: []net.IP{{104, 217, 255, 178}, {104, 217, 255, 180}, {208, 84, 155, 106}}},
{Country: "United States", Region: "Utah", City: "Salt Lake City", IPs: []net.IP{{45, 74, 52, 4}, {172, 94, 1, 4}, {172, 94, 26, 4}, {45, 74, 52, 4}, {172, 94, 1, 4}, {45, 74, 52, 4}, {141, 101, 168, 4}, {172, 94, 1, 4}, {45, 74, 52, 4}, {141, 101, 168, 4}, {172, 94, 26, 4}, {45, 74, 52, 4}, {141, 101, 168, 4}, {172, 94, 1, 4}, {172, 94, 72, 4}, {45, 74, 52, 4}, {45, 74, 52, 4}}},
{Country: "United States", Region: "Virginia", City: "Reston", IPs: []net.IP{{5, 254, 77, 27}, {5, 254, 77, 29}, {5, 254, 77, 140}, {5, 254, 77, 141}}},
}
}

View File

@@ -0,0 +1,80 @@
package constants
import "github.com/qdm12/gluetun/internal/models"
func GetAllServers() (allServers models.AllServers) {
//nolint:gomnd
return models.AllServers{
Version: 1, // used for migration of the top level scheme
Cyberghost: models.CyberghostServers{
Version: 1, // model version
Timestamp: 1620326951, // latest takes precedence
Servers: CyberghostServers(),
},
Fastestvpn: models.FastestvpnServers{
Version: 1,
Timestamp: 1620326951,
Servers: FastestvpnServers(),
},
HideMyAss: models.HideMyAssServers{
Version: 1,
Timestamp: 1620326951,
Servers: HideMyAssServers(),
},
Mullvad: models.MullvadServers{
Version: 1,
Timestamp: 1612031135,
Servers: MullvadServers(),
},
Nordvpn: models.NordvpnServers{
Version: 1,
Timestamp: 1611096594,
Servers: NordvpnServers(),
},
Privado: models.PrivadoServers{
Version: 2,
Timestamp: 1620326951,
Servers: PrivadoServers(),
},
Privatevpn: models.PrivatevpnServers{
Version: 1,
Timestamp: 1620326951,
Servers: PrivatevpnServers(),
},
Protonvpn: models.ProtonvpnServers{
Version: 1,
Timestamp: 1618605078,
Servers: ProtonvpnServers(),
},
Pia: models.PiaServers{
Version: 4,
Timestamp: 1619272345,
Servers: PIAServers(),
},
Purevpn: models.PurevpnServers{
Version: 1,
Timestamp: 1620326951,
Servers: PurevpnServers(),
},
Surfshark: models.SurfsharkServers{
Version: 1,
Timestamp: 1620326951,
Servers: SurfsharkServers(),
},
Torguard: models.TorguardServers{
Version: 1,
Timestamp: 1613357861,
Servers: TorguardServers(),
},
Vyprvpn: models.VyprvpnServers{
Version: 1,
Timestamp: 1620326951,
Servers: VyprvpnServers(),
},
Windscribe: models.WindscribeServers{
Version: 2,
Timestamp: 1612031135,
Servers: WindscribeServers(),
},
}
}

View File

@@ -0,0 +1,224 @@
package constants
import (
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"testing"
"github.com/qdm12/gluetun/internal/models"
"github.com/stretchr/testify/assert"
)
func digestServerModelVersion(t *testing.T, server interface{}, version uint16) string {
bytes, err := json.Marshal(server)
if err != nil {
t.Fatal(err)
}
bytes = append(bytes, []byte(fmt.Sprintf("%d", version))...)
arr := sha256.Sum256(bytes)
hexString := hex.EncodeToString(arr[:])
if len(hexString) > 8 {
hexString = hexString[:8]
}
return hexString
}
func Test_versions(t *testing.T) {
t.Parallel()
allServers := GetAllServers()
const format = "you forgot to update the version for %s"
testCases := map[string]struct {
model interface{}
version uint16
digest string
}{
"Cyberghost": {
model: models.CyberghostServer{},
version: allServers.Cyberghost.Version,
digest: "fd6242bb",
},
"Fastestvpn": {
model: models.FastestvpnServer{},
version: allServers.Fastestvpn.Version,
digest: "8825919b",
},
"HideMyAss": {
model: models.HideMyAssServer{},
version: allServers.HideMyAss.Version,
digest: "a93b4057",
},
"Mullvad": {
model: models.MullvadServer{},
version: allServers.Mullvad.Version,
digest: "665e9dc1",
},
"Nordvpn": {
model: models.NordvpnServer{},
version: allServers.Nordvpn.Version,
digest: "040de8d0",
},
"Privado": {
model: models.PrivadoServer{},
version: allServers.Privado.Version,
digest: "1d5aeb23",
},
"Private Internet Access": {
model: models.PIAServer{},
version: allServers.Pia.Version,
digest: "3e6066ec",
},
"Privatevpn": {
model: models.PrivatevpnServer{},
version: allServers.Privatevpn.Version,
digest: "cba13d78",
},
"Protonvpn": {
model: models.ProtonvpnServer{},
version: allServers.Protonvpn.Version,
digest: "b964085b",
},
"Purevpn": {
model: models.PurevpnServer{},
version: allServers.Purevpn.Version,
digest: "ada45379",
},
"Surfshark": {
model: models.SurfsharkServer{},
version: allServers.Surfshark.Version,
digest: "042bef64",
},
"Torguard": {
model: models.TorguardServer{},
version: allServers.Torguard.Version,
digest: "752702f3",
},
"Vyprvpn": {
model: models.VyprvpnServer{},
version: allServers.Vyprvpn.Version,
digest: "042bef64",
},
"Windscribe": {
model: models.WindscribeServer{},
version: allServers.Windscribe.Version,
digest: "6e3ca639",
},
}
for name, testCase := range testCases {
name := name
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
digest := digestServerModelVersion(t, testCase.model, testCase.version)
failureMessage := fmt.Sprintf(format, name)
assert.Equal(t, testCase.digest, digest, failureMessage)
})
}
}
func digestServersTimestamp(t *testing.T, servers interface{}, timestamp int64) string {
bytes, err := json.Marshal(servers)
if err != nil {
t.Fatal(err)
}
bytes = append(bytes, []byte(fmt.Sprintf("%d", timestamp))...)
arr := sha256.Sum256(bytes)
hexString := hex.EncodeToString(arr[:])
if len(hexString) > 8 {
hexString = hexString[:8]
}
return hexString
}
func Test_timestamps(t *testing.T) {
t.Parallel()
allServers := GetAllServers()
const format = "you forgot to update the timestamp for %s"
testCases := map[string]struct {
servers interface{}
timestamp int64
digest string
}{
"Cyberghost": {
servers: allServers.Cyberghost.Servers,
timestamp: allServers.Cyberghost.Timestamp,
digest: "81d0cc77",
},
"Fastestvpn": {
servers: allServers.Fastestvpn.Version,
timestamp: allServers.Fastestvpn.Timestamp,
digest: "feccb41a",
},
"HideMyAss": {
servers: allServers.HideMyAss.Servers,
timestamp: allServers.HideMyAss.Timestamp,
digest: "546a98cb",
},
"Mullvad": {
servers: allServers.Mullvad.Servers,
timestamp: allServers.Mullvad.Timestamp,
digest: "e2e006cf",
},
"Nordvpn": {
servers: allServers.Nordvpn.Servers,
timestamp: allServers.Nordvpn.Timestamp,
digest: "2296312c",
},
"Privado": {
servers: allServers.Privado.Servers,
timestamp: allServers.Privado.Timestamp,
digest: "e7968fd3",
},
"Private Internet Access": {
servers: allServers.Pia.Servers,
timestamp: allServers.Pia.Timestamp,
digest: "403bdc67",
},
"Privatevpn": {
servers: allServers.Privatevpn.Servers,
timestamp: allServers.Privatevpn.Timestamp,
digest: "6d32d785",
},
"Protonvpn": {
servers: allServers.Protonvpn.Servers,
timestamp: allServers.Protonvpn.Timestamp,
digest: "c342020e",
},
"Purevpn": {
servers: allServers.Purevpn.Servers,
timestamp: allServers.Purevpn.Timestamp,
digest: "617505bd",
},
"Surfshark": {
servers: allServers.Surfshark.Servers,
timestamp: allServers.Surfshark.Timestamp,
digest: "38e7ea80",
},
"Torguard": {
servers: allServers.Torguard.Servers,
timestamp: allServers.Torguard.Timestamp,
digest: "dffab93e",
},
"Vyprvpn": {
servers: allServers.Vyprvpn.Servers,
timestamp: allServers.Vyprvpn.Timestamp,
digest: "eccb7f5c",
},
"Windscribe": {
servers: allServers.Windscribe.Servers,
timestamp: allServers.Windscribe.Timestamp,
digest: "4e719aa3",
},
}
for name, testCase := range testCases {
name := name
testCase := testCase
t.Run(name, func(t *testing.T) {
t.Parallel()
digest := digestServersTimestamp(t, testCase.servers, testCase.timestamp)
failureMessage := fmt.Sprintf(format, name)
assert.Equal(t, testCase.digest, digest, failureMessage)
})
}
}

View File

@@ -1,13 +1,13 @@
package constants
const (
// Annoucement is a message annoucement
Annoucement = "Total rewrite in Go with many new features"
// AnnoucementExpiration is the expiration time of the annoucement in unix timestamp
AnnoucementExpiration = 1582761600
// Announcement is a message announcement.
Announcement = "New Docker image qmcgaw/gluetun"
// AnnouncementExpiration is the expiration date of the announcement in format yyyy-mm-dd.
AnnouncementExpiration = "2021-01-20"
)
const (
// IssueLink is the link for users to use to create issues
IssueLink = "https://github.com/qdm12/private-internet-access-docker/issues/new"
// IssueLink is the link for users to use to create issues.
IssueLink = "https://github.com/qdm12/gluetun/issues/new"
)

View File

@@ -0,0 +1,17 @@
package constants
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func Test_AnnouncementExpiration(t *testing.T) {
t.Parallel()
if len(AnnouncementExpiration) == 0 {
return
}
_, err := time.Parse("2006-01-02", AnnouncementExpiration)
assert.NoError(t, err)
}

View File

@@ -0,0 +1,14 @@
package constants
import (
"github.com/qdm12/gluetun/internal/models"
)
const (
Starting models.LoopStatus = "starting"
Running models.LoopStatus = "running"
Stopping models.LoopStatus = "stopping"
Stopped models.LoopStatus = "stopped"
Crashed models.LoopStatus = "crashed"
Completed models.LoopStatus = "completed"
)

View File

@@ -0,0 +1,190 @@
package constants
import (
"net"
"github.com/qdm12/gluetun/internal/models"
)
//nolint:lll
const (
SurfsharkCertificate = "MIIFTTCCAzWgAwIBAgIJAMs9S3fqwv+mMA0GCSqGSIb3DQEBCwUAMD0xCzAJBgNVBAYTAlZHMRIwEAYDVQQKDAlTdXJmc2hhcmsxGjAYBgNVBAMMEVN1cmZzaGFyayBSb290IENBMB4XDTE4MDMxNDA4NTkyM1oXDTI4MDMxMTA4NTkyM1owPTELMAkGA1UEBhMCVkcxEjAQBgNVBAoMCVN1cmZzaGFyazEaMBgGA1UEAwwRU3VyZnNoYXJrIFJvb3QgQ0EwggIiMA0G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0HZnREHhqieGbkaGKLkyu7zQ4D4tRK/mBhd8nv+09GtPEG+D5LPbabFVxKjBMP4Vp24WuSUOqcGSsURHevawPVBfgmsxf1UCjelaIwngdh6WfNCRXa5QQPQTKubQvkvXONCDdhmdXQccnRX1nJWhPYi0onffvjsWUfztRypsKzX4dvM9k7xnIcGSGEnCC4RCgt1UiZIj7frcCMssbA6vJ9naM0s7JF7N3VKeHJtqe1OCRHMYnWUZt9vrqX6IoIHlZCoLlv39wFW9QNxelcAOCVbD+19MZ0ZXt7LitjIqe7yF5WxDQN4xru087FzQ4Hfj7eH1SNLLyKZkA1eecjmRoi/OoqAt7afSnwtQLtMUc2bQDg6rHt5C0e4dCLqP/9PGZTSJiwmtRHJ/N5qYWIh9ju83APvLm/AGBTR2pXmj9G3KdVOkpIC7L35dI623cSEC3Q3UZutsEm/UplsM="
SurfsharkOpenvpnStaticKeyV1 = "b02cb1d7c6fee5d4f89b8de72b51a8d0c7b282631d6fc19be1df6ebae9e2779e6d9f097058a31c97f57f0c35526a44ae09a01d1284b50b954d9246725a1ead1ff224a102ed9ab3da0152a15525643b2eee226c37041dc55539d475183b889a10e18bb94f079a4a49888da566b99783460ece01daaf93548beea6c827d9674897e7279ff1a19cb092659e8c1860fbad0db4ad0ad5732f1af4655dbd66214e552f04ed8fd0104e1d4bf99c249ac229ce169d9ba22068c6c0ab742424760911d4636aafb4b85f0c952a9ce4275bc821391aa65fcd0d2394f006e3fba0fd34c4bc4ab260f4b45dec3285875589c97d3087c9134d3a3aa2f904512e85aa2dc2202498"
)
func SurfsharkRegionChoices() (choices []string) {
servers := SurfsharkServers()
choices = make([]string, len(servers))
for i := range servers {
choices[i] = servers[i].Region
}
return makeUnique(choices)
}
//nolint:lll
// SurfsharkServers returns a slice of all the server information for Surfshark.
func SurfsharkServers() []models.SurfsharkServer {
return []models.SurfsharkServer{
{Region: "Albania", IPs: []net.IP{{31, 171, 154, 99}, {31, 171, 152, 195}, {31, 171, 154, 101}, {31, 171, 153, 133}}},
{Region: "Argentina Buenos Aires", IPs: []net.IP{{91, 206, 168, 52}, {91, 206, 168, 29}, {91, 206, 168, 21}, {91, 206, 168, 50}}},
{Region: "Australia Adelaide", IPs: []net.IP{{45, 248, 79, 29}, {45, 248, 79, 35}, {45, 248, 79, 19}, {45, 248, 79, 37}, {45, 248, 79, 85}, {45, 248, 79, 51}}},
{Region: "Australia Brisbane", IPs: []net.IP{{45, 248, 77, 235}, {144, 48, 39, 109}}},
{Region: "Australia Melbourne", IPs: []net.IP{{144, 48, 38, 19}, {103, 192, 80, 11}, {103, 192, 80, 149}, {103, 192, 80, 229}}},
{Region: "Australia Perth", IPs: []net.IP{{124, 150, 139, 37}, {124, 150, 139, 179}, {124, 150, 139, 123}, {124, 150, 139, 27}, {124, 150, 139, 35}, {45, 248, 78, 45}}},
{Region: "Australia Sydney", IPs: []net.IP{{45, 248, 76, 171}, {103, 25, 59, 53}, {45, 125, 247, 107}, {45, 125, 247, 109}, {103, 25, 59, 51}, {45, 125, 247, 195}}},
{Region: "Australia US", IPs: []net.IP{{45, 76, 117, 108}}},
{Region: "Austria", IPs: []net.IP{{37, 120, 212, 149}, {37, 120, 212, 133}, {37, 120, 212, 141}, {89, 187, 168, 51}, {89, 187, 168, 46}, {37, 120, 212, 139}}},
{Region: "Azerbaijan", IPs: []net.IP{{62, 212, 239, 67}}},
{Region: "Belgium", IPs: []net.IP{{217, 138, 211, 221}, {5, 253, 205, 211}}},
{Region: "Bosnia and Herzegovina", IPs: []net.IP{{185, 212, 111, 59}, {185, 99, 3, 12}, {185, 99, 3, 98}, {185, 99, 3, 108}}},
{Region: "Brazil", IPs: []net.IP{{191, 96, 73, 228}, {45, 231, 207, 70}, {191, 96, 13, 38}, {191, 96, 13, 202}}},
{Region: "Bulgaria", IPs: []net.IP{{37, 120, 152, 37}, {37, 120, 152, 195}, {37, 120, 152, 197}}},
{Region: "Canada Montreal", IPs: []net.IP{{172, 98, 82, 245}, {91, 245, 254, 69}, {91, 245, 254, 93}, {91, 245, 254, 43}, {91, 245, 254, 53}, {91, 245, 254, 21}, {91, 245, 254, 35}, {172, 98, 82, 243}}},
{Region: "Canada Toronto", IPs: []net.IP{{68, 71, 244, 195}, {68, 71, 244, 212}, {192, 111, 128, 143}, {192, 111, 128, 148}, {68, 71, 244, 131}, {104, 200, 138, 99}}},
{Region: "Canada Toronto mp001", IPs: []net.IP{{138, 197, 151, 26}}},
{Region: "Canada US", IPs: []net.IP{{159, 203, 57, 80}}},
{Region: "Canada Vancouver", IPs: []net.IP{{107, 181, 177, 183}, {107, 181, 177, 179}, {208, 78, 41, 195}, {66, 115, 147, 92}}},
{Region: "Chile", IPs: []net.IP{{31, 169, 121, 5}, {31, 169, 121, 3}}},
{Region: "Colombia", IPs: []net.IP{{45, 129, 32, 5}, {45, 129, 32, 32}, {45, 129, 32, 13}, {45, 129, 32, 27}, {45, 129, 32, 38}, {45, 129, 32, 29}}},
{Region: "Costa Rica", IPs: []net.IP{{176, 227, 241, 35}, {176, 227, 241, 19}, {176, 227, 241, 21}, {176, 227, 241, 26}}},
{Region: "Croatia", IPs: []net.IP{{176, 222, 34, 130}, {89, 164, 99, 134}, {89, 164, 99, 136}, {85, 10, 51, 89}}},
{Region: "Cyprus", IPs: []net.IP{{195, 47, 194, 42}, {195, 47, 194, 56}, {195, 47, 194, 61}, {195, 47, 194, 87}, {195, 47, 194, 40}, {195, 47, 194, 52}}},
{Region: "Czech Republic", IPs: []net.IP{{217, 138, 220, 141}, {193, 9, 112, 183}, {193, 9, 112, 195}, {217, 138, 220, 155}, {217, 138, 220, 131}, {217, 138, 220, 171}}},
{Region: "Denmark", IPs: []net.IP{{37, 120, 194, 91}, {193, 29, 107, 173}, {193, 29, 107, 197}, {193, 29, 107, 211}, {193, 29, 107, 101}, {37, 120, 194, 101}, {37, 120, 194, 93}, {193, 29, 107, 99}, {37, 120, 145, 21}, {89, 45, 7, 53}}},
{Region: "Estonia", IPs: []net.IP{{185, 174, 159, 138}, {185, 174, 159, 67}, {165, 231, 163, 21}, {185, 174, 159, 136}, {185, 174, 159, 61}, {185, 174, 159, 59}, {165, 231, 163, 19}, {165, 231, 163, 5}}},
{Region: "Finland", IPs: []net.IP{{196, 244, 191, 163}, {196, 244, 191, 91}, {196, 244, 191, 181}, {196, 244, 191, 43}, {196, 244, 191, 37}, {196, 244, 191, 101}}},
{Region: "France Bordeaux", IPs: []net.IP{{185, 108, 106, 24}, {185, 108, 106, 144}, {185, 108, 106, 51}, {185, 108, 106, 142}, {185, 108, 106, 102}, {185, 108, 106, 100}, {185, 108, 106, 74}, {185, 108, 106, 21}, {185, 108, 106, 106}, {185, 108, 106, 188}, {185, 108, 106, 158}, {185, 108, 106, 182}, {185, 108, 106, 162}, {185, 108, 106, 186}}},
{Region: "France Marseilles", IPs: []net.IP{{185, 166, 84, 33}, {138, 199, 16, 135}, {185, 166, 84, 93}, {185, 166, 84, 83}, {185, 166, 84, 17}, {185, 166, 84, 23}}},
{Region: "France Paris", IPs: []net.IP{{143, 244, 57, 71}, {143, 244, 57, 103}, {217, 138, 207, 251}, {84, 17, 43, 185}, {143, 244, 57, 85}, {45, 89, 174, 59}, {45, 83, 90, 183}, {143, 244, 57, 93}}},
{Region: "France Sweden", IPs: []net.IP{{199, 247, 8, 20}}},
{Region: "Germany Berlin", IPs: []net.IP{{152, 89, 163, 243}, {152, 89, 163, 21}, {193, 176, 86, 195}, {37, 120, 217, 131}, {193, 29, 106, 179}, {193, 29, 106, 211}, {193, 29, 106, 123}, {193, 29, 106, 197}, {89, 36, 76, 53}, {193, 176, 86, 171}, {193, 29, 106, 27}}},
{Region: "Germany Frankfurt am Main", IPs: []net.IP{{37, 120, 197, 13}, {138, 199, 19, 154}, {82, 102, 16, 99}, {185, 59, 220, 150}}},
{Region: "Germany Frankfurt am Main st001", IPs: []net.IP{{45, 87, 212, 179}}},
{Region: "Germany Frankfurt am Main st002", IPs: []net.IP{{45, 87, 212, 181}}},
{Region: "Germany Frankfurt am Main st003", IPs: []net.IP{{45, 87, 212, 183}}},
{Region: "Germany Frankfurt am Main st004", IPs: []net.IP{{195, 181, 174, 226}}},
{Region: "Germany Frankfurt am Main st005", IPs: []net.IP{{195, 181, 174, 228}}},
{Region: "Germany Frankfurt mp001", IPs: []net.IP{{46, 101, 189, 14}}},
{Region: "Germany Munich", IPs: []net.IP{{79, 143, 191, 231}}},
{Region: "Germany Nuremberg", IPs: []net.IP{{62, 171, 151, 160}}},
{Region: "Germany Singapour", IPs: []net.IP{{159, 89, 14, 157}}},
{Region: "Germany UK", IPs: []net.IP{{46, 101, 250, 73}}},
{Region: "Greece", IPs: []net.IP{{194, 150, 167, 44}, {194, 150, 167, 50}, {194, 150, 167, 28}, {194, 150, 167, 36}}},
{Region: "Hong Kong", IPs: []net.IP{{212, 102, 42, 196}, {84, 17, 37, 160}, {212, 102, 42, 206}, {212, 102, 42, 209}}},
{Region: "Hungary", IPs: []net.IP{{37, 120, 144, 199}, {37, 120, 144, 147}, {37, 120, 144, 245}, {37, 120, 144, 243}, {37, 120, 144, 149}, {37, 120, 144, 197}}},
{Region: "Iceland", IPs: []net.IP{{45, 133, 193, 211}, {45, 133, 193, 109}, {45, 133, 193, 221}, {45, 133, 193, 213}}},
{Region: "India Chennai", IPs: []net.IP{{103, 94, 27, 117}, {103, 94, 27, 181}, {103, 108, 117, 147}, {103, 94, 27, 227}}},
{Region: "India Indore", IPs: []net.IP{{103, 39, 132, 187}, {103, 39, 132, 189}}},
{Region: "India Mumbai", IPs: []net.IP{{103, 156, 51, 61}, {103, 156, 50, 97}, {103, 156, 51, 10}, {103, 156, 50, 85}}},
{Region: "India UK", IPs: []net.IP{{134, 209, 148, 122}}},
{Region: "Indonesia", IPs: []net.IP{{103, 120, 66, 234}, {103, 120, 66, 214}, {103, 120, 66, 236}, {103, 148, 242, 163}}},
{Region: "Ireland", IPs: []net.IP{{5, 157, 13, 85}, {185, 252, 222, 107}, {185, 252, 222, 109}, {37, 120, 235, 229}, {37, 120, 235, 205}, {185, 252, 222, 101}}},
{Region: "Israel", IPs: []net.IP{{87, 239, 255, 109}, {87, 239, 255, 119}, {87, 239, 255, 114}, {87, 239, 255, 121}, {87, 239, 255, 116}}},
{Region: "Italy Milan", IPs: []net.IP{{212, 102, 54, 147}, {84, 17, 58, 192}, {212, 102, 54, 130}, {84, 17, 58, 154}, {212, 102, 54, 160}, {37, 120, 201, 23}}},
{Region: "Italy Rome", IPs: []net.IP{{185, 217, 71, 227}, {37, 120, 207, 117}, {185, 217, 71, 229}, {82, 102, 26, 53}}},
{Region: "Japan Tokyo", IPs: []net.IP{{89, 187, 161, 22}, {138, 199, 22, 139}, {84, 17, 34, 24}, {138, 199, 22, 132}, {138, 199, 22, 143}, {89, 187, 161, 239}}},
{Region: "Japan Tokyo st001", IPs: []net.IP{{45, 87, 213, 19}}},
{Region: "Japan Tokyo st002", IPs: []net.IP{{45, 87, 213, 21}}},
{Region: "Japan Tokyo st003", IPs: []net.IP{{45, 87, 213, 23}}},
{Region: "Japan Tokyo st004", IPs: []net.IP{{217, 138, 212, 19}}},
{Region: "Japan Tokyo st005", IPs: []net.IP{{217, 138, 212, 21}}},
{Region: "Japan Tokyo st006", IPs: []net.IP{{82, 102, 28, 123}}},
{Region: "Japan Tokyo st007", IPs: []net.IP{{82, 102, 28, 125}}},
{Region: "Japan Tokyo st008", IPs: []net.IP{{89, 187, 161, 12}}},
{Region: "Japan Tokyo st009", IPs: []net.IP{{89, 187, 161, 14}}},
{Region: "Japan Tokyo st010", IPs: []net.IP{{89, 187, 161, 17}}},
{Region: "Japan Tokyo st011", IPs: []net.IP{{89, 187, 161, 19}}},
{Region: "Japan Tokyo st012", IPs: []net.IP{{89, 187, 161, 7}}},
{Region: "Japan Tokyo st013", IPs: []net.IP{{89, 187, 161, 9}}},
{Region: "Kazakhstan", IPs: []net.IP{{5, 189, 202, 14}, {5, 189, 202, 16}}},
{Region: "Korea", IPs: []net.IP{{45, 130, 137, 40}, {27, 255, 77, 226}, {27, 255, 77, 197}, {45, 130, 137, 5}, {45, 130, 137, 50}, {27, 255, 77, 195}, {45, 130, 137, 32}, {45, 130, 137, 12}}},
{Region: "Latvia", IPs: []net.IP{{188, 92, 78, 205}, {188, 92, 78, 203}, {188, 92, 78, 208}, {91, 203, 69, 146}, {188, 92, 78, 140}, {91, 203, 69, 148}}},
{Region: "Luxembourg", IPs: []net.IP{{185, 153, 151, 60}, {185, 153, 151, 89}, {185, 153, 151, 148}, {185, 153, 151, 98}, {185, 153, 151, 94}, {185, 153, 151, 118}, {185, 153, 151, 108}, {185, 153, 151, 120}, {185, 153, 151, 62}, {185, 153, 151, 100}, {185, 153, 151, 106}, {185, 153, 151, 78}}},
{Region: "Malaysia", IPs: []net.IP{{42, 0, 30, 164}, {42, 0, 30, 179}, {42, 0, 30, 177}, {42, 0, 30, 162}}},
{Region: "Mexico City Mexico", IPs: []net.IP{{194, 41, 112, 21}, {194, 41, 112, 24}, {194, 41, 112, 26}, {194, 41, 112, 3}, {194, 41, 112, 30}, {194, 41, 112, 5}}},
{Region: "Moldova", IPs: []net.IP{{178, 175, 128, 235}, {178, 175, 128, 237}}},
{Region: "Netherlands Amsterdam", IPs: []net.IP{{81, 19, 209, 20}, {89, 46, 223, 82}, {178, 239, 173, 47}, {89, 187, 174, 231}, {89, 46, 223, 229}, {143, 244, 42, 79}}},
{Region: "Netherlands Amsterdam mp001", IPs: []net.IP{{188, 166, 43, 117}}},
{Region: "Netherlands Amsterdam st001", IPs: []net.IP{{81, 19, 209, 51}}},
{Region: "Netherlands US", IPs: []net.IP{{188, 166, 98, 91}}},
{Region: "New Zealand", IPs: []net.IP{{180, 149, 231, 69}, {180, 149, 231, 67}, {180, 149, 231, 117}, {180, 149, 231, 119}, {180, 149, 231, 115}, {180, 149, 231, 45}}},
{Region: "Nigeria", IPs: []net.IP{{102, 165, 23, 38}, {102, 165, 23, 4}}},
{Region: "North Macedonia", IPs: []net.IP{{185, 225, 28, 67}, {185, 225, 28, 99}, {185, 225, 28, 245}, {185, 225, 28, 243}}},
{Region: "Norway", IPs: []net.IP{{91, 219, 215, 85}, {91, 219, 215, 21}, {45, 12, 223, 67}, {91, 219, 215, 35}, {84, 247, 50, 69}, {95, 174, 66, 35}, {95, 174, 66, 37}, {95, 174, 66, 41}, {91, 219, 215, 19}, {45, 12, 223, 197}}},
{Region: "Paraguay", IPs: []net.IP{{186, 16, 32, 168}, {186, 16, 32, 173}, {186, 16, 32, 163}, {181, 40, 18, 59}}},
{Region: "Philippines", IPs: []net.IP{{45, 134, 224, 10}, {45, 134, 224, 18}, {45, 134, 224, 15}, {45, 134, 224, 8}}},
{Region: "Poland Gdansk", IPs: []net.IP{{37, 28, 156, 115}, {37, 28, 156, 117}, {5, 133, 8, 117}, {5, 187, 49, 189}}},
{Region: "Poland Warsaw", IPs: []net.IP{{185, 246, 208, 77}, {5, 253, 206, 227}, {5, 253, 206, 67}, {5, 253, 206, 69}, {5, 253, 206, 71}, {185, 246, 208, 182}, {138, 199, 17, 132}, {185, 246, 208, 72}}},
{Region: "Portugal Lisbon", IPs: []net.IP{{5, 154, 174, 65}, {91, 205, 230, 152}, {91, 250, 240, 142}, {91, 250, 240, 150}, {5, 154, 174, 173}, {5, 154, 174, 179}, {5, 154, 174, 221}, {91, 205, 230, 154}, {5, 154, 174, 213}, {91, 250, 240, 144}, {5, 154, 174, 211}}},
{Region: "Portugal Porto", IPs: []net.IP{{194, 39, 127, 183}, {194, 39, 127, 171}}},
{Region: "Romania", IPs: []net.IP{{185, 102, 217, 194}, {37, 120, 206, 235}, {86, 106, 137, 149}, {185, 102, 217, 155}, {185, 102, 217, 157}, {217, 148, 143, 211}, {217, 148, 143, 221}, {217, 148, 143, 219}, {185, 102, 217, 196}, {185, 102, 217, 161}, {217, 148, 143, 213}, {185, 102, 217, 167}}},
{Region: "Russia Moscow", IPs: []net.IP{{92, 38, 138, 112}, {92, 38, 138, 118}}},
{Region: "Serbia", IPs: []net.IP{{152, 89, 160, 117}, {152, 89, 160, 115}}},
{Region: "Singapore", IPs: []net.IP{{89, 187, 163, 202}, {89, 187, 163, 195}, {156, 146, 56, 130}, {89, 187, 163, 132}, {89, 187, 163, 136}, {89, 187, 163, 212}, {156, 146, 56, 137}}},
{Region: "Singapore Hong Kong", IPs: []net.IP{{206, 189, 83, 129}}},
{Region: "Singapore Netherlands", IPs: []net.IP{{104, 248, 148, 18}}},
{Region: "Singapore in", IPs: []net.IP{{128, 199, 193, 35}}},
{Region: "Singapore mp001", IPs: []net.IP{{206, 189, 94, 229}}},
{Region: "Singapore st001", IPs: []net.IP{{217, 138, 201, 91}}},
{Region: "Singapore st002", IPs: []net.IP{{217, 138, 201, 93}}},
{Region: "Singapore st003", IPs: []net.IP{{84, 247, 49, 19}}},
{Region: "Singapore st004", IPs: []net.IP{{84, 247, 49, 21}}},
{Region: "Slovekia", IPs: []net.IP{{37, 120, 221, 5}, {193, 37, 255, 35}}},
{Region: "Slovenia", IPs: []net.IP{{195, 158, 249, 38}, {195, 158, 249, 48}, {195, 158, 249, 50}}},
{Region: "South Africa", IPs: []net.IP{{102, 165, 47, 136}, {102, 165, 47, 130}, {154, 127, 49, 226}, {154, 127, 50, 130}, {102, 165, 47, 138}, {154, 127, 49, 228}, {154, 16, 93, 51}}},
{Region: "Spain Barcelona", IPs: []net.IP{{185, 188, 61, 25}, {37, 120, 142, 181}, {185, 188, 61, 41}, {185, 188, 61, 43}, {37, 120, 142, 135}, {185, 188, 61, 57}}},
{Region: "Spain Madrid", IPs: []net.IP{{89, 37, 95, 27}, {84, 17, 62, 163}, {188, 208, 141, 18}, {188, 208, 141, 36}, {212, 102, 48, 10}, {188, 208, 141, 20}, {188, 208, 141, 34}, {212, 102, 48, 13}, {212, 102, 48, 20}, {84, 17, 62, 165}}},
{Region: "Spain Valencia", IPs: []net.IP{{185, 153, 150, 63}, {196, 196, 150, 101}, {196, 196, 150, 85}, {196, 196, 150, 83}}},
{Region: "Sweden", IPs: []net.IP{{185, 76, 9, 34}, {185, 76, 9, 41}}},
{Region: "Switzerland", IPs: []net.IP{{156, 146, 62, 34}, {156, 146, 62, 51}, {156, 146, 62, 49}, {84, 17, 53, 225}, {156, 146, 62, 39}, {45, 12, 222, 243}, {37, 120, 213, 3}, {84, 17, 53, 208}}},
{Region: "Taiwan", IPs: []net.IP{{2, 58, 241, 29}, {103, 152, 151, 83}, {2, 58, 242, 45}, {2, 58, 241, 45}, {103, 152, 151, 5}, {2, 58, 241, 27}, {2, 58, 241, 43}}},
{Region: "Thailand", IPs: []net.IP{{27, 131, 138, 176}}},
{Region: "UK France", IPs: []net.IP{{188, 166, 168, 247}}},
{Region: "UK Germany", IPs: []net.IP{{45, 77, 58, 16}}},
{Region: "UK Glasgow", IPs: []net.IP{{185, 108, 105, 145}, {185, 108, 105, 182}, {185, 108, 105, 209}, {185, 108, 105, 5}, {185, 108, 105, 207}, {185, 108, 105, 174}, {185, 108, 105, 153}, {185, 108, 105, 11}}},
{Region: "UK London", IPs: []net.IP{{185, 134, 22, 232}, {185, 141, 206, 194}, {185, 134, 22, 115}, {89, 34, 96, 86}, {81, 19, 210, 220}, {195, 206, 169, 203}, {5, 226, 139, 225}, {188, 240, 71, 167}, {5, 226, 139, 149}, {217, 146, 83, 85}, {86, 106, 157, 242}, {185, 134, 22, 191}}},
{Region: "UK London mp001", IPs: []net.IP{{206, 189, 119, 92}}},
{Region: "UK London st001", IPs: []net.IP{{217, 146, 82, 83}}},
{Region: "UK London st002", IPs: []net.IP{{185, 134, 22, 80}}},
{Region: "UK London st003", IPs: []net.IP{{185, 134, 22, 92}}},
{Region: "UK London st004", IPs: []net.IP{{185, 44, 76, 186}}},
{Region: "UK London st005", IPs: []net.IP{{185, 44, 76, 188}}},
{Region: "UK Manchester", IPs: []net.IP{{37, 120, 233, 69}, {217, 138, 196, 203}, {91, 90, 121, 203}, {91, 90, 121, 189}}},
{Region: "US Atlanta", IPs: []net.IP{{66, 115, 154, 135}, {195, 181, 171, 238}, {195, 181, 171, 226}, {195, 181, 171, 247}}},
{Region: "US Bend", IPs: []net.IP{{154, 16, 168, 186}, {45, 43, 14, 83}, {45, 43, 14, 85}, {45, 43, 14, 105}}},
{Region: "US Boston", IPs: []net.IP{{173, 237, 207, 30}, {173, 237, 207, 36}, {173, 237, 207, 44}, {173, 237, 207, 62}, {173, 237, 207, 38}}},
{Region: "US Buffalo", IPs: []net.IP{{172, 93, 146, 84}, {107, 174, 20, 130}, {172, 93, 146, 212}}},
{Region: "US Charlotte", IPs: []net.IP{{192, 154, 255, 52}, {154, 16, 171, 195}, {154, 16, 171, 206}, {154, 16, 171, 213}}},
{Region: "US Chicago", IPs: []net.IP{{138, 199, 42, 141}, {138, 199, 42, 133}, {138, 199, 42, 151}, {143, 244, 60, 167}, {138, 199, 42, 149}, {184, 170, 250, 152}, {138, 199, 42, 153}, {89, 187, 182, 175}}},
{Region: "US Dallas", IPs: []net.IP{{107, 181, 173, 163}, {212, 102, 40, 81}, {66, 115, 177, 133}, {212, 102, 40, 73}}},
{Region: "US Denver", IPs: []net.IP{{212, 102, 44, 71}, {212, 102, 44, 66}, {212, 102, 44, 81}, {212, 102, 44, 73}, {212, 102, 44, 96}, {212, 102, 44, 78}}},
{Region: "US Gahanna", IPs: []net.IP{{104, 244, 210, 139}, {104, 244, 210, 123}, {104, 244, 209, 51}, {104, 244, 208, 99}, {104, 244, 211, 171}, {104, 244, 208, 211}}},
{Region: "US Houston", IPs: []net.IP{{199, 10, 64, 181}, {199, 10, 64, 147}, {199, 10, 64, 133}, {199, 10, 64, 67}, {199, 10, 64, 83}, {199, 10, 64, 99}, {199, 10, 64, 179}, {199, 10, 64, 85}}},
{Region: "US Kansas City", IPs: []net.IP{{63, 141, 248, 181}, {173, 208, 202, 59}}},
{Region: "US Las Vegas", IPs: []net.IP{{79, 110, 53, 205}, {79, 110, 54, 131}, {79, 110, 54, 133}, {89, 187, 187, 147}}},
{Region: "US Latham", IPs: []net.IP{{154, 16, 169, 5}, {45, 43, 19, 76}, {154, 16, 169, 7}, {45, 43, 19, 74}, {45, 43, 19, 68}, {45, 43, 19, 84}}},
{Region: "US Los Angeles", IPs: []net.IP{{138, 199, 9, 195}, {138, 199, 9, 209}, {184, 170, 243, 197}, {192, 111, 134, 202}, {89, 187, 187, 81}, {138, 199, 9, 199}, {184, 170, 243, 195}, {192, 111, 134, 197}, {89, 187, 187, 71}, {212, 103, 49, 147}}},
{Region: "US Maryland", IPs: []net.IP{{207, 244, 86, 33}, {207, 244, 65, 17}, {207, 244, 125, 132}, {207, 244, 127, 118}}},
{Region: "US Miami", IPs: []net.IP{{87, 101, 93, 181}, {87, 101, 93, 179}, {45, 87, 214, 243}, {87, 101, 93, 173}, {89, 38, 227, 171}, {89, 38, 227, 173}, {45, 87, 214, 253}, {91, 219, 214, 11}, {212, 102, 61, 130}, {91, 219, 214, 3}}},
{Region: "US Netherlands", IPs: []net.IP{{142, 93, 58, 71}}},
{Region: "US New York City", IPs: []net.IP{{199, 36, 221, 114}, {172, 98, 75, 37}, {89, 187, 177, 122}, {199, 36, 221, 99}, {172, 98, 75, 39}, {199, 36, 221, 116}, {84, 17, 35, 116}, {84, 17, 35, 83}}},
{Region: "US New York City mp001", IPs: []net.IP{{45, 55, 60, 159}}},
{Region: "US New York City st001", IPs: []net.IP{{92, 119, 177, 19}}},
{Region: "US New York City st002", IPs: []net.IP{{92, 119, 177, 21}}},
{Region: "US New York City st003", IPs: []net.IP{{92, 119, 177, 23}}},
{Region: "US New York City st004", IPs: []net.IP{{193, 148, 18, 51}}},
{Region: "US New York City st005", IPs: []net.IP{{193, 148, 18, 53}}},
{Region: "US Orlando", IPs: []net.IP{{198, 147, 22, 197}, {66, 115, 182, 82}, {198, 147, 22, 85}, {66, 115, 182, 77}, {198, 147, 22, 149}, {198, 147, 22, 195}, {198, 147, 22, 131}, {66, 115, 182, 84}, {198, 147, 22, 147}, {66, 115, 182, 67}, {66, 115, 182, 104}, {66, 115, 182, 112}}},
{Region: "US Phoenix", IPs: []net.IP{{107, 181, 184, 115}, {199, 58, 187, 18}, {199, 58, 187, 15}, {199, 58, 187, 20}, {172, 98, 87, 37}, {107, 181, 184, 117}, {199, 58, 187, 25}}},
{Region: "US Portugal", IPs: []net.IP{{142, 93, 81, 242}}},
{Region: "US Saint Louis", IPs: []net.IP{{148, 72, 169, 211}, {148, 72, 174, 36}, {148, 72, 174, 46}, {148, 72, 174, 53}}},
{Region: "US Salt Lake City", IPs: []net.IP{{104, 200, 131, 249}, {104, 200, 131, 229}, {104, 200, 131, 172}, {104, 200, 131, 167}, {104, 200, 131, 170}, {104, 200, 131, 233}, {104, 200, 131, 245}}},
{Region: "US San Francisco", IPs: []net.IP{{107, 181, 166, 229}, {107, 181, 166, 85}, {185, 124, 240, 155}, {185, 124, 240, 145}}},
{Region: "US San Francisco mp001", IPs: []net.IP{{165, 232, 53, 25}}},
{Region: "US Seatle", IPs: []net.IP{{198, 8, 80, 83}, {84, 17, 41, 79}, {212, 102, 46, 71}, {212, 102, 46, 45}, {212, 102, 46, 46}, {84, 17, 41, 85}}},
{Region: "US Tampa", IPs: []net.IP{{209, 216, 92, 200}, {209, 216, 92, 227}, {209, 216, 92, 207}, {209, 216, 92, 202}}},
{Region: "Ukraine", IPs: []net.IP{{45, 9, 238, 23}, {176, 107, 185, 71}}},
{Region: "United Arab Emirates", IPs: []net.IP{{45, 9, 250, 101}, {176, 125, 231, 19}, {45, 9, 249, 243}, {176, 125, 231, 5}, {45, 9, 250, 103}, {176, 125, 231, 13}, {45, 9, 249, 247}, {45, 9, 249, 245}}},
{Region: "Vietnam", IPs: []net.IP{{202, 143, 110, 32}, {202, 143, 110, 36}}},
}
}

View File

@@ -1,20 +0,0 @@
package constants
import (
"github.com/qdm12/private-internet-access-docker/internal/models"
)
const (
// TinyProxyInfoLevel is the info log level for TinyProxy
TinyProxyInfoLevel models.TinyProxyLogLevel = "Info"
// TinyProxyConnectLevel is the info log level for TinyProxy
TinyProxyConnectLevel models.TinyProxyLogLevel = "Connect"
// TinyProxyNoticeLevel is the info log level for TinyProxy
TinyProxyNoticeLevel models.TinyProxyLogLevel = "Notice"
// TinyProxyWarnLevel is the warning log level for TinyProxy
TinyProxyWarnLevel models.TinyProxyLogLevel = "Warning"
// TinyProxyErrorLevel is the error log level for TinyProxy
TinyProxyErrorLevel models.TinyProxyLogLevel = "Error"
// TinyProxyCriticalLevel is the critical log level for TinyProxy
TinyProxyCriticalLevel models.TinyProxyLogLevel = "Critical"
)

Some files were not shown because too many files have changed in this diff Show More