mullvadrb 0.0.2 ā 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/mullvadrb/connection.rb +20 -1
- data/lib/mullvadrb/servers.rb +3 -3
- data/lib/mullvadrb.rb +1 -2
- data/mullvadrb.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b1705d449260a54db9087125b5e4a9e0a6db3d548eb5d21dbeac3fb0031a83
|
4
|
+
data.tar.gz: ef45c9ffec12967471be56c4ca096e4af2bd1e4fde8011744bab1333bf17ea7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78f22e514750210bab56f43fb18d06fa214c25832782ba6593ea915cdcc077235c25daf695ba6ea3aac10badc01e85b9a77d854073dcfaf35079ba6ddc33d85
|
7
|
+
data.tar.gz: 8234009792fa8e18dc7efef9a6e78e5441a5448086c0b7e5d42ab0f11fec3a618a1a8a305dfe0f8ac39cd3ba90d386cbc160ef32ea6204e5ae97e714a9f84447
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 0.0.3
|
2
|
+
|
3
|
+
Minor cleanup in the code and updates the way status is displayed.
|
4
|
+
|
1
5
|
# 0.0.2
|
2
6
|
|
3
7
|
I added back the support for WireGuard, in cases you don't want to or can't install the `mullvad` cli app, which was the initial reason I built this. The first time you run the app, it's going to ask you which one you want to use, and save your preference in `~/.local/share/mullvadrb/backend.conf`. You can switch backends from the Main Menu on the app at any time.
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Most of the basic functionality is available for either backend: Select a server
|
|
13
13
|
You need to have a [Mullvad VPN](https://mullvad.net) account to use the app.
|
14
14
|
|
15
15
|
> [!WARNING]
|
16
|
-
> `mullvad` uses WireGuard, so if you change backends while connected to an OpenVPN server with `wg`, `mullvad` won't be able to disconnect from the OpenVPN.
|
16
|
+
> `mullvad` uses WireGuard, so if you change backends while connected to an OpenVPN server with `wg`, `mullvad` won't be able to disconnect from the OpenVPN connection.
|
17
17
|
> In general, it's a good idea to stick to one backend, and disconnect from the VPN before switching backends.
|
18
18
|
> This might potentially be fixed in the future.
|
19
19
|
|
data/lib/mullvadrb/connection.rb
CHANGED
@@ -26,7 +26,26 @@ module Mullvadrb
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def status
|
29
|
-
|
29
|
+
status = `mullvad status -v`
|
30
|
+
if status.start_with?('Disconnected')
|
31
|
+
status.gsub!('Disconnected', "\nā šØ DISCONNECTED šØ cā ")
|
32
|
+
.gsub!(/$/, "\n")
|
33
|
+
elsif status.start_with?('Connected')
|
34
|
+
status = status.split("\n")
|
35
|
+
.sort
|
36
|
+
.reject { |a| a == 'Connected' }
|
37
|
+
.prepend("š” Connected ā
\n")
|
38
|
+
.push("\n")
|
39
|
+
.join("\n")
|
40
|
+
elsif status.start_with?('Connecting')
|
41
|
+
status = status.split("\n")
|
42
|
+
.sort
|
43
|
+
.reject { |a| a == 'Connecting' }
|
44
|
+
.prepend("š Connecting ā \n")
|
45
|
+
.push("\n")
|
46
|
+
.join("\n")
|
47
|
+
end
|
48
|
+
status
|
30
49
|
end
|
31
50
|
end
|
32
51
|
end
|
data/lib/mullvadrb/servers.rb
CHANGED
@@ -6,7 +6,7 @@ module Mullvadrb
|
|
6
6
|
def update
|
7
7
|
`mullvad relay update`
|
8
8
|
data = `mullvad relay list`
|
9
|
-
country, city, info, flag
|
9
|
+
country, city, info, flag = nil
|
10
10
|
|
11
11
|
# Each line is either a country, a city or a server
|
12
12
|
servers = data.split("\n").compact.reject(&:empty?).map do |s|
|
@@ -86,8 +86,8 @@ module Mullvadrb
|
|
86
86
|
|
87
87
|
def emoji_from_code(code)
|
88
88
|
code.upcase
|
89
|
-
|
90
|
-
|
89
|
+
.codepoints
|
90
|
+
.map { |c| (c + 127_397).chr('utf-8') }.join
|
91
91
|
end
|
92
92
|
|
93
93
|
def load_servers
|
data/lib/mullvadrb.rb
CHANGED
data/mullvadrb.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mullvadrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Briano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: countries
|