Jump to content


Photo

Help with plugin development (OpenVPN) needed


  • Please log in to reply
8 replies to this topic

#1 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 17:10

Hi!

I'm looking for someone who could assist in creating new plugins respectively replace outdated existing ones with 'fresh from scratch' code.

One of the plugins I planned would be "OpenVPN":
I couldn't find any (open) distro to have a decent OpenVPN plugin which would allow easy creation of certificates/profiles.

While I could handle the core work of deciding which information is required and how to get things together into a smoothly working config, I'm not able to create E2 plugins providing the necessary user interaction from scratch myself.

For example I would need a dialog, where the user can enter zero to multiple different string/text values, which I would like to have inside a list.
So when the user presses "OK" on "Edit hostnames" for example, a new screen should pop up, listing all current text values, allowing the user to delete them (e.g. using red button) or to add a new one (e.g. after pressing green button).
And I have absolutely no idea about how code for such a thing would look like inside an E2 plugin.
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: Help with plugin development (OpenVPN) needed #2 WanWizard

  • PLi® Core member
  • 70,851 posts

+1,832
Excellent

Posted 29 December 2016 - 17:14

Something like the remotestreamconverter does with it's host list? https://github.com/E...treamConverter/


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Help with plugin development (OpenVPN) needed #3 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 17:22

Huh?
Where? How?

I can only enter data for a single host there ...
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: Help with plugin development (OpenVPN) needed #4 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 17:24

What I mean is more like the dialog where I can add/remove recording locations, just that it would only require a single list and no file selection part.
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: Help with plugin development (OpenVPN) needed #5 WanWizard

  • PLi® Core member
  • 70,851 posts

+1,832
Excellent

Posted 29 December 2016 - 17:32

I'm trying to get to grips with your way of thinking.

 

Normally you would start with a list of profiles (with add/edit/delete/up/down/exit). Where add and edit would pop up a dialog in which you can enter/update the data for that profile. Having a dropdown list of hostnames seems to me a bit pointless, since one hostname only runs one OpenVPN service, which can therefore be only one profile. So either way, you only need to enter the host once, so why not directly as a string in the profile dialog?

 

But I might be missing something... ;)


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Help with plugin development (OpenVPN) needed #6 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 17:47

I didn't exactly start at the beginning but with the dialog with puzzles me most.

The starting point would of course most probably be an (initially) empty list of profiles/configs and some color button actions.

The need to enter multiple hosts results from the certificate creation:
I would like to share the root CA and server certs with OpenWebif and there they would need to contain all hostnames the user might be accessing it as.

I already wrote some (shell) code which is able to gather some of them:
root@quadbox /etc/openvpn/easy-rsa # ./test
DYN.1 = mynet.dyndns.org
DYN.2 = mybox.mooo.com
DYN.3 = quadbox
DYN.4 = quadbox.box
DYN.5 = quadbox.local
IP.1 = 192.168.75.17
IP.2 = fdc1:affe:c0c0:0:4670:bff:fe12:3456
IP.3 = 2001:db8::4670:bff:fe12:3456
IP.4 = fe80::4670:bff:fe12:3456

The problem is within DYN.1 and DYN.2: They weren't auto-detected but read from some config file which I simply created manually for tests.
Another problem is IP.3: The user should have a yes/no option to chose if his IPv6 is static (true for most tunnel providers) or dynamic (true for most providers, at least in Germany).
In the latter case, it doesn't belong into the cert.
The same applies to IP.1: While one can see from /etc/network/interfaces if it is statically configured (Which I strongly discourage), there is no way to auto-guess if the box gets a static lease when it is set to DHCP.
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: Help with plugin development (OpenVPN) needed #7 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 17:54

Actually one can find out DynDNS hosts from the box itself:

root@quadbox /etc/openvpn/easy-rsa # nslookup 2001:db8::4670:bff:fe12:3456 8.8.8.8
Server:    2001:db8::1
Address 1: 2001:db8::1 link.box

Name:      2001:db8::4670:bff:fe12:3456
Address 1: 2001:db8::4670:bff:fe12:3456 quadbox.mooo.com
... but that will only work for hosts that can also be reverse-resolved ... and I doubt the majority of users has set up proper reverse DNS delegation ...
... let alone the fact that it is not really available for most ...
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390

Re: Help with plugin development (OpenVPN) needed #8 WanWizard

  • PLi® Core member
  • 70,851 posts

+1,832
Excellent

Posted 29 December 2016 - 18:06

Ah, ok, get it. Have to think about this one.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Help with plugin development (OpenVPN) needed #9 SpaceRat

  • Senior Member
  • 1,030 posts

+65
Good

Posted 29 December 2016 - 18:35

I was thinking about a dialog like this to add Dyn hostnames:
blo.png
1st box: Vu+ Ultimo 4k 4xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
2nd box: Gigablue Quad 4k 2xDVB-S2 FBC / 2xDVB-C / 1.8 TB HDD / OpenATV 6.2
testing boxes: Vu+ Duo² + AX Quadbox HD2400 + 2x Vu+ Solo² + Octagon SF4008
Sats & Pay-TV: Astra 19.2°E + Hotbird 13°E with Redlight / SCT HD / SES Astra HD- / Sky V14 / 4th empire propaganda TV
Card-Server: Raspberry Pi + IPv6-capable oscam
Router: Linksys WRT1900ACS w/ LEDE + Fritz!Box 7390


5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users