Skip to content

Commit b1d57d8

Browse files
committed
rpn: rmv proton
1 parent 19ec581 commit b1d57d8

6 files changed

Lines changed: 31 additions & 1918 deletions

File tree

intra/ipn/proxies.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ func (px *proxifier) RegisterWin(entitlementOrState *x.Gobyte) (stateJson *x.Gob
12411241
}
12421242

12431243
// TODO: create a new proxy type for win, so Refresh() could be sent to /connect
1244-
1244+
// TODO: best location: github.com/Windscribe/browser-extension/blob/ed83749ad1/modules/ext/src/utils/getBestLocation.js
12451245
rp, err := px.addRpnProxy(win, mainCountryCode)
12461246
if err != nil || rp == nil {
12471247
log.E("proxy: ws: add wg for %s failed: %v", win.Who(), err)

intra/ipn/warp/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ type RpnAcc interface {
4545
}
4646

4747
var _ RpnAcc = (*AgwClient)(nil)
48-
var _ RpnAcc = (*ProtonClient)(nil)
4948
var _ RpnAcc = (*WarpClient)(nil)
5049
var _ RpnAcc = (*WsClient)(nil)
5150

intra/ipn/warp/cfg.go

Lines changed: 0 additions & 354 deletions
Original file line numberDiff line numberDiff line change
@@ -130,360 +130,6 @@ var warpDefaultHeaders = map[string]string{
130130
"CF-Client-Version": "a-6.30-3596",
131131
}
132132

133-
// raw.githubusercontent.com/ProtonVPN/android-app/81a6dfb9a0/app/src/main/assets/GuestHoleServers.json
134-
var prebuiltProtonServersJson = []byte(`[
135-
{
136-
"Name": "CH#134",
137-
"EntryCountry": "CH",
138-
"ExitCountry": "CH",
139-
"Domain": "node-ch-19.protonvpn.net",
140-
"Tier": 2,
141-
"Features": 28,
142-
"Region": null,
143-
"City": "Zurich",
144-
"Score": 1.9545809733000001,
145-
"HostCountry": null,
146-
"OrganizationID": null,
147-
"VPNGatewayID": null,
148-
"ID": "zLENALrs0gKRxklX2WQEie3Id9jS8b1dmVJtSIdxNw6WQGrzLLbYn4Kopiw6qAtsS2g1UZYBGKsK5Hv5F5qL7w==",
149-
"Location": {
150-
"Lat": 47.369999999999997,
151-
"Long": 8.5399999999999991
152-
},
153-
"Status": 1,
154-
"Servers": [
155-
{
156-
"EntryIP": "149.88.27.233",
157-
"ExitIP": "79.127.207.150",
158-
"Domain": "node-ch-19.protonvpn.net",
159-
"ID": "UEdFuY56fyOmtHF4kvRsAXiwO4UD11B4sxErD_8LocIhC7OewevUWGYEkNxFC-vyTUDBAd2Ov3zPZFM7YoEwew==",
160-
"Label": "21",
161-
"X25519PublicKey": "MDJPYLKrGYv11Mis97Ihk/aPULhC5us44hx3Fa1/8lk=",
162-
"Generation": 0,
163-
"Status": 1,
164-
"ServicesDown": 0,
165-
"ServicesDownReason": null
166-
}
167-
],
168-
"Load": 52
169-
},
170-
{
171-
"Name": "RU#32",
172-
"EntryCountry": "RU",
173-
"ExitCountry": "RU",
174-
"Domain": "node-ru-05.protonvpn.net",
175-
"Tier": 2,
176-
"Features": 0,
177-
"Region": null,
178-
"City": "Moscow",
179-
"Score": 6.9646272026,
180-
"HostCountry": null,
181-
"OrganizationID": null,
182-
"VPNGatewayID": null,
183-
"ID": "S1DylepEYb4v1k1UttfdkjuEnmpw-jcJ-gewEGvrILOhipr9XJDOO15s1AtK3HmYOXga6XfIVW45qCnTpRx-yA==",
184-
"Location": {
185-
"Lat": 55.75,
186-
"Long": 37.609999999999999
187-
},
188-
"Status": 1,
189-
"Servers": [
190-
{
191-
"EntryIP": "176.96.226.242",
192-
"ExitIP": "176.96.226.246",
193-
"Domain": "node-ru-05.protonvpn.net",
194-
"ID": "4Vk8ZzXUZoNm92MlX_QleLkyxUDZRLNGk-3ICGwDXBz_aQhK4_9hxRUyhTI_qeBYP34LsCMJ9AzIOi7CZswtfg==",
195-
"Label": "3",
196-
"X25519PublicKey": "2VsdP/qE6leGtnym8gEFd4DN0Q9iFFEBOZOo8WqArz8=",
197-
"Generation": 0,
198-
"Status": 1,
199-
"ServicesDown": 0,
200-
"ServicesDownReason": null
201-
}
202-
],
203-
"Load": 7
204-
},
205-
{
206-
"Name": "MX#34",
207-
"EntryCountry": "MX",
208-
"ExitCountry": "MX",
209-
"Domain": "mx-04.protonvpn.net",
210-
"Tier": 2,
211-
"Features": 12,
212-
"Region": null,
213-
"City": "Mexico City",
214-
"Score": 2.9912186567000001,
215-
"HostCountry": "US",
216-
"OrganizationID": null,
217-
"VPNGatewayID": null,
218-
"ID": "g9LIAs16UvlmcB-wFUD6AzvO6ogSHFpGL8Rw6F0Zgcr-KBIq2a9wCr0sPe_EZeZR6Q_crA6WYveE8qSMjka3Iw==",
219-
"Location": {
220-
"Lat": 19.43,
221-
"Long": -99.129999999999995
222-
},
223-
"Status": 1,
224-
"Servers": [
225-
{
226-
"EntryIP": "84.252.113.9",
227-
"ExitIP": "84.252.113.18",
228-
"Domain": "mx-04.protonvpn.net",
229-
"ID": "LbRenZdjlNtnRS2_KlEkrP3173vU9TTNngo3kbq5ID6iyWubqAbvKRbbd9NNI4PouDsFy6mJYFskd1-4GHs6Vw==",
230-
"Label": "9",
231-
"X25519PublicKey": "G/3o3VMavYShMnCn6wN1XLNKrAzUYmK7NAEXqmpTCgo=",
232-
"Generation": 0,
233-
"Status": 1,
234-
"ServicesDown": 0,
235-
"ServicesDownReason": null
236-
}
237-
],
238-
"Load": 17
239-
},
240-
{
241-
"Name": "CH#511",
242-
"EntryCountry": "CH",
243-
"ExitCountry": "CH",
244-
"Domain": "node-ch-27.protonvpn.net",
245-
"Tier": 2,
246-
"Features": 28,
247-
"Region": null,
248-
"City": "Zurich",
249-
"Score": 1.9270561310000001,
250-
"HostCountry": null,
251-
"OrganizationID": null,
252-
"VPNGatewayID": null,
253-
"ID": "rJtc6OoWrH_jOkCjTaupVRKX_3cL-itVggpXXTdTh-GqUxO-GOck2psgmqSKUo1aqlIwqiPMHyXKT841wx6b2g==",
254-
"Location": {
255-
"Lat": 47.369999999999997,
256-
"Long": 8.5399999999999991
257-
},
258-
"Status": 1,
259-
"Servers": [
260-
{
261-
"EntryIP": "185.230.125.2",
262-
"ExitIP": "185.230.125.28",
263-
"Domain": "node-ch-27.protonvpn.net",
264-
"ID": "MqVcFGvDWbWDQbJpin9HbX_seNES20sDozDlV2QC3W-wGdjhpKam9h2-X_-DdnSC4hMisp6n0aGN9aEzawiyVA==",
265-
"Label": "25",
266-
"X25519PublicKey": "mJ0AogpjvmGEhogMux0gWjWu0rFIdyZORR7caFa5SG0=",
267-
"Generation": 0,
268-
"Status": 1,
269-
"ServicesDown": 0,
270-
"ServicesDownReason": null
271-
}
272-
],
273-
"Load": 32
274-
},
275-
{
276-
"Name": "US-IL#133",
277-
"EntryCountry": "US",
278-
"ExitCountry": "US",
279-
"Domain": "node-us-240.protonvpn.net",
280-
"Tier": 2,
281-
"Features": 28,
282-
"Region": null,
283-
"City": "Chicago",
284-
"Score": 2.9868736071999997,
285-
"HostCountry": null,
286-
"OrganizationID": null,
287-
"VPNGatewayID": null,
288-
"ID": "hnYz1B3WxfEzVfbqQFtk-64knsPCcKPlMHPolh6vsZyW-Z8AFSEYQP4e8acapH2x7WXsdQbRSj9vmDBCAuM5OA==",
289-
"Location": {
290-
"Lat": 41.880000000000003,
291-
"Long": -87.620000000000005
292-
},
293-
"Status": 1,
294-
"Servers": [
295-
{
296-
"EntryIP": "87.249.134.138",
297-
"ExitIP": "149.88.105.97",
298-
"Domain": "node-us-240.protonvpn.net",
299-
"ID": "qjQirVbyfZ4Ly028xgvI-OqClK9EguQ1wKjckEl2JENe--tr2mRRNPJ1AMVyvr9gX3c-13YBepzx5BRdd2SD9A==",
300-
"Label": "6",
301-
"X25519PublicKey": "WNLAmQkeAvdg9QRFMXq7EuwpEWWkltWwiS/DGIcjHjs=",
302-
"Generation": 0,
303-
"Status": 1,
304-
"ServicesDown": 0,
305-
"ServicesDownReason": null
306-
}
307-
],
308-
"Load": 32
309-
},
310-
{
311-
"Name": "CH#297",
312-
"EntryCountry": "CH",
313-
"ExitCountry": "CH",
314-
"Domain": "node-ch-16.protonvpn.net",
315-
"Tier": 2,
316-
"Features": 12,
317-
"Region": null,
318-
"City": "Zurich",
319-
"Score": 1.9631482647,
320-
"HostCountry": null,
321-
"OrganizationID": null,
322-
"VPNGatewayID": null,
323-
"ID": "WycCMPTW6NR7BOSoGV9oDfw9e6dueKy3XkGC7Vob7RYnJMlV6eErpKX-2aHb1xAKbWNkT2C83KRvEh9g_2u4nA==",
324-
"Location": {
325-
"Lat": 47.369999999999997,
326-
"Long": 8.5399999999999991
327-
},
328-
"Status": 1,
329-
"Servers": [
330-
{
331-
"EntryIP": "149.88.27.193",
332-
"ExitIP": "149.22.89.84",
333-
"Domain": "node-ch-16.protonvpn.net",
334-
"ID": "EiNVXtn15vfpDsstwlqKGO4WKDVTBF6-7ST_P0w3TNqAeDQLBg23f3icE745OQoZ3tOy8nN5XfJLNqTrMFmonQ==",
335-
"Label": "15",
336-
"X25519PublicKey": "WYXA8DeAZIF4th8Dfbw02osdbFc24sK10zKijcJvZwU=",
337-
"Generation": 0,
338-
"Status": 1,
339-
"ServicesDown": 0,
340-
"ServicesDownReason": null
341-
}
342-
],
343-
"Load": 59
344-
},
345-
{
346-
"Name": "UK#183",
347-
"EntryCountry": "UK",
348-
"ExitCountry": "UK",
349-
"Domain": "node-uk-21.protonvpn.net",
350-
"Tier": 2,
351-
"Features": 28,
352-
"Region": null,
353-
"City": "London",
354-
"Score": 2.9825145305,
355-
"HostCountry": null,
356-
"OrganizationID": null,
357-
"VPNGatewayID": null,
358-
"ID": "whlvasrl4qkvLv-bOYyQ9gOqXCXqfHtwK2rTNPtMIYtK1oKj2LxNW-YZL4MgJaY-kmaweUVCbwWtKuUeMmp16g==",
359-
"Location": {
360-
"Lat": 51.5,
361-
"Long": -0.11
362-
},
363-
"Status": 1,
364-
"Servers": [
365-
{
366-
"EntryIP": "149.40.48.65",
367-
"ExitIP": "149.40.48.70",
368-
"Domain": "node-uk-21.protonvpn.net",
369-
"ID": "pCauEp8FKwUwgskElW98TZSywQVOyLel1ksxvSIRD23wh-tFpHToweoB_LDygS-ludddLjfJFqg3A7945QvZlQ==",
370-
"Label": "4",
371-
"X25519PublicKey": "DgzYjQOQBgtBFUeyj3bVXpzl0qZE1I3/rk/IDS1b8kg=",
372-
"Generation": 0,
373-
"Status": 1,
374-
"ServicesDown": 0,
375-
"ServicesDownReason": null
376-
}
377-
],
378-
"Load": 45
379-
},
380-
{
381-
"Name": "US-CA#365",
382-
"EntryCountry": "US",
383-
"ExitCountry": "US",
384-
"Domain": "node-us-243.protonvpn.net",
385-
"Tier": 2,
386-
"Features": 28,
387-
"Region": null,
388-
"City": "Los Angeles",
389-
"Score": 2.9968377886999997,
390-
"HostCountry": null,
391-
"OrganizationID": null,
392-
"VPNGatewayID": null,
393-
"ID": "L9BIB5vx8r1w57krBMtZMXue2gdAiVs0h5-f8qFUMbywnH8SxrjNmT-gSfvz04qC0pezI9PF8FXEYBiXmVLIpA==",
394-
"Location": {
395-
"Lat": 34.049999999999997,
396-
"Long": -118.23999999999999
397-
},
398-
"Status": 1,
399-
"Servers": [
400-
{
401-
"EntryIP": "149.22.80.28",
402-
"ExitIP": "149.22.80.37",
403-
"Domain": "node-us-243.protonvpn.net",
404-
"ID": "wrizr7jcG4nxQ4CrDiOJL7PKp6TFAiHPwesC2HhR3hbna_tIa_GDpjz7VMU-Zo68zjswYlEYXnr4UJ2fqKtZGw==",
405-
"Label": "8",
406-
"X25519PublicKey": "bXiKQCzCfajtuTNSQQpAqcrO0Rhid5d6E3MseL2lxXU=",
407-
"Generation": 0,
408-
"Status": 1,
409-
"ServicesDown": 0,
410-
"ServicesDownReason": null
411-
}
412-
],
413-
"Load": 27
414-
},
415-
{
416-
"Name": "US-IL#171",
417-
"EntryCountry": "US",
418-
"ExitCountry": "US",
419-
"Domain": "node-us-241.protonvpn.net",
420-
"Tier": 2,
421-
"Features": 28,
422-
"Region": null,
423-
"City": "Chicago",
424-
"Score": 2.9939104842000002,
425-
"HostCountry": null,
426-
"OrganizationID": null,
427-
"VPNGatewayID": null,
428-
"ID": "_rjpVVYhXwwq_k16LC-oxgqqGG9mZwcpFXPe891qLAh-_SUSYRq-dNO4RBnLQWxcJdxXMcD65D0pn4Dgg2E7IA==",
429-
"Location": {
430-
"Lat": 41.880000000000003,
431-
"Long": -87.620000000000005
432-
},
433-
"Status": 1,
434-
"Servers": [
435-
{
436-
"EntryIP": "87.249.134.139",
437-
"ExitIP": "149.88.105.83",
438-
"Domain": "node-us-241.protonvpn.net",
439-
"ID": "fnKtG6JlaQdbaEKtia64PcwIORN0kxc8XQ1pi_jKAiJDPcF7YONGbJdJN_wUFaMyECeffoTdtX0-v-rmJ0jFxw==",
440-
"Label": "18",
441-
"X25519PublicKey": "xuqP9uEGryELhamLSK9IDRNhljo3lA1zL9/gS7yj2WQ=",
442-
"Generation": 0,
443-
"Status": 1,
444-
"ServicesDown": 0,
445-
"ServicesDownReason": null
446-
}
447-
],
448-
"Load": 37
449-
},
450-
{
451-
"Name": "US-NJ#63",
452-
"EntryCountry": "US",
453-
"ExitCountry": "US",
454-
"Domain": "node-us-257.protonvpn.net",
455-
"Tier": 2,
456-
"Features": 12,
457-
"Region": null,
458-
"City": "Secaucus",
459-
"Score": 2.9916803943999999,
460-
"HostCountry": null,
461-
"OrganizationID": null,
462-
"VPNGatewayID": null,
463-
"ID": "MtThHF-IVjIqsu9MiCD0kB1rLQ92CRxSKTzeHYKEOZZvRgv8gntoZ1OlMh5g7M6IDcNVplSEl3Aiu6AdYJBuxw==",
464-
"Location": {
465-
"Lat": 40.777999999999999,
466-
"Long": -74.099999999999994
467-
},
468-
"Status": 1,
469-
"Servers": [
470-
{
471-
"EntryIP": "163.5.171.29",
472-
"ExitIP": "163.5.171.43",
473-
"Domain": "node-us-257.protonvpn.net",
474-
"ID": "k8fdOxB-uYdEbn5vQmLpHrEeEfqz-AQEiPMBrVZWhETnwYlMNgAauQMGiwxwLO4fRuMS0kFG8c4Y4CQ33ROKVg==",
475-
"Label": "13",
476-
"X25519PublicKey": "6Ct2qC5B3ayxBtkV2y6ScFzYcLD/6fLmtMmHPCJTAVU=",
477-
"Generation": 0,
478-
"Status": 1,
479-
"ServicesDown": 0,
480-
"ServicesDownReason": null
481-
}
482-
],
483-
"Load": 33
484-
}
485-
]`)
486-
487133
func randomWarpCidrs() (v4 netip.Prefix, v6 netip.Prefix) {
488134
return warpCidrs4[rand.Intn(len(warpCidrs4))], warpCidrs6[rand.Intn(len(warpCidrs6))]
489135
}

0 commit comments

Comments
 (0)