elementary / switchboard-plug-network

Switchboard Network Plug
GNU General Public License v3.0
20 stars 23 forks source link

VPN Panel Redesign #208

Closed arshubham closed 4 years ago

arshubham commented 4 years ago

Fixes https://github.com/elementary/switchboard-plug-network/issues/139 , Fixes https://github.com/elementary/switchboard-plug-network/issues/126 , Fixes https://github.com/elementary/switchboard-plug-network/issues/122 Fixes https://github.com/elementary/switchboard-plug-network/issues/121 , Fixes https://github.com/elementary/switchboard-plug-network/issues/67, Fixes https://github.com/elementary/switchboard-plug-network/issues/66 , Fixes https://github.com/elementary/switchboard-plug-network/issues/59 , Fixes https://github.com/elementary/switchboard-plug-network/issues/54 , Fixes https://github.com/elementary/switchboard-plug-network/issues/52 , Fixes https://github.com/elementary/switchboard-plug-network/issues/46 , Fixes https://github.com/elementary/switchboard-plug-network/issues/44 , Fixes https://github.com/elementary/switchboard-plug-network/issues/40 , Fixes https://github.com/elementary/switchboard-plug-network/issues/33 , Fixes https://github.com/elementary/switchboard-plug-network/issues/7

image

image

tintou commented 4 years ago

I was going to do a proper review but it looks like all what you did in get_key_group_username (and similar ones) was replaced in GNOME Control Center here https://github.com/GNOME/gnome-control-center/commit/aabc1621b87295c2f12810766ab1c3724acc0d34#diff-6cde69db28e078281497952725f10e3a it might be worth investigate a proper way to do this instead of relying on string comparisons :)

arshubham commented 4 years ago

@tintou I looked into it. Gnome now doesn't show any VPN details at all. I can't find of any other why to so this, without some string comparisons since each VPN type produces different key value pairs. For now in this PR, I just preserved the existing functionality.

PPTP:

gateway => uk.pptpvpn.net
lcp-echo-failure => 5
refuse-chap => yes
user => listvpn.net-qwerty123
require-mppe => yes
password-flags => 0
lcp-echo-interval => 30

Open VPN

ta => /home/shubhamarora/.cert/nm-openvpn/ca.protonvpn.com.udp-tls-auth.pem
dev => tun
ca => /home/shubhamarora/.cert/nm-openvpn/ca.protonvpn.com.udp-ca.pem
remote-cert-tls => server
username => arshubhampm
mssfix => 1450
tunnel-mtu => 1500
reneg-seconds => 0
comp-lzo => no-by-default
cipher => AES-256-CBC
remote => ca.protonvpn.com:80, ca.protonvpn.com:443, ca.protonvpn.com:4569, ca.protonvpn.com:1194, ca.protonvpn.com:5060
password-flags => 1
auth => SHA512
connection-type => password
ta-dir => 1
remote-random => yes

L2TP

password-flags => 0
user => listvpn.net-qwerty1234
gateway => us3.listvpn.net

I can see two alternatives, here

  1. Support only the most famous/used protocols. (OpenVPN, PPTP, L2TP and Wiregurard) and only show status and VPN type for others.
  2. Print all info from the connection.get_setting_vpn () as seen above in a the existing format.

Thoughts?

danirabbit commented 4 years ago

I have a branch that uses Granite.MessageDialog here: https://github.com/elementary/switchboard-plug-network/pull/209

Otherwise, seems good from a UX perspective :+1: