Jump to content
Not connected, Your IP: 52.87.176.39
Sign in to follow this  
bananaphone69

ANSWERED generate config via api

Recommended Posts

Hi,

I was wondering if there is a way to get the .ovpn config files downloaded via terminal in Ubuntu. I am trying to automate my setup a bit. The goal is to download .ovpn files for all available servers and stored locally to integrate into network manager. I'm not a very advanced user but am trying to learn; apologies if this question is covered elsewhere or doesn't make sense. I couldn't find anything like this in the API FAQ.

Share this post


Link to post

Use the "Client Area"/"Config Generator" tabs.
Check the "Advanced Mode" box.
Select the "Linux" button in "Choose your Operating System".
Select "UDP" in "Protocols".
In the "By single servers" area click the "Invert selection" button.
At the bottom press the "Generate" button.
Then find "or download an archive by choosing a format" and select one to download.

Share this post


Link to post

It seems this may not be possible to do via API but I wanted to see if there are any other options to automate this procedure into a script.

My hope is to have a .zip file with the downloaded .ovpn files contained within that is downloaded to my machine. If anyone knows of a method to do this with a script, please let me know.

Share this post


Link to post

Check this project, from one of the community members:
https://github.com/corrad1nho/qomui
 

Add config files:

qomui-cli -a $provider
Connect to a server:

qomui-cli -c $server
Activate options (e.g. firewall):

qomui-cli -e firewall
List and filter available servers:

qomui-cli -l Airvpn "United States"
It's also possible with Eddie cli but python will be probably more easier to start with.

Occasional moderator, sometimes BOFH. Opinions are my own, except when my wife disagrees.

Share this post


Link to post
On 5/25/2019 at 1:31 AM, zhang888 said:

Check this project, from one of the community members:
https://github.com/corrad1nho/qomui
 


Add config files:

qomui-cli -a $provider
Connect to a server:

qomui-cli -c $server
Activate options (e.g. firewall):

qomui-cli -e firewall
List and filter available servers:

qomui-cli -l Airvpn "United States"
It's also possible with Eddie cli but python will be probably more easier to start with.
Hi, thank you for the response. I feel I am close but coming up against a wall. When I use qomui-cli -a airvpn, after giving a path and login, terminal gives me the following response:

Please wait....
Traceback (most recent call last):
  File "/usr/bin/qomui-cli", line 11, in <module>
    load_entry_point('qomui==0.8.2', 'console_scripts', 'qomui-cli')()
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_cli.py", line 438, in main
    ex = QomuiCli(args=args)
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_cli.py", line 52, in __init__
    self.arguments(self.args)
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_cli.py", line 183, in arguments
    self.add_server(provider)
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_cli.py", line 253, in add_server
    self.qomui_service.import_thread(credentials)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.KeyError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_service.py", line 363, in import_thread
    self.start_import_thread(provider, credentials)
  File "/usr/lib/python3.6/dist-packages/qomui/qomui_service.py", line 366, in start_import_thread
    setattr(self, "import_{}".format(provider), update.AddServers(credentials))
  File "/usr/lib/python3.6/dist-packages/qomui/update.py", line 58, in __init__
    self.update = credentials["update"]
KeyError: 'update'

Do you maybe know what's going on?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...