GithubHelp home page GithubHelp logo

vpn's Introduction

vpn - my personal openconnect and vpn wrapper

This is my personal OpenConnect and OpenVPN client wrapper which I use on daily bases because I'm lazy and somehow would like an easy way to check all my connections and configurations.

This script has been build on FreeBSD, so it might only work there :-)

What does it do?

Basically it parses some configuration files provided in your ~/.vpn folder with the following syntax:

service.provider.rc
~~~o~~~ ~~~o~~~
   |       |
   |       o----- Your personal provider name, customer name, or whatever (for example ghostvpn)
   o------------- If it's an openvpn or openconnect service (only these two file types are supported)

Based on the service it run the openconnect command or start a regular FreeBSD openvpn rc-service. For OpenVPN I use the existing rc-services because they work well with multiple configuration files anyway.

How does the files look like?

OpenConnect

It's a regular openconnect configuration file, each line is a long-format configuration option. But there are some additional requirements:

  • Each config file should start with # [https://]server[:port][/group] (because this could not be specified in the configuration file by default)
  • You should always add the option background (to us the script in a regular way)
  • You should add the option pid-file=/var/run/openconnect.YOURPROVIDER.pid to help the script for status information.

Example:

# https://vpn.example.com/SSLVPN
background
passwd-on-stdin
pid-file=/var/run/openconnect.example.pid
user=super.user

Use pass

If the option passwd-on-stdin is used the pass command is executed to receive the password. You need to store the password in the following location:

vpn/service.provider

OpenVPN

They only contains the existing rc-service name, for example:

openvpn_example

Usage

You should simple use the -h option to see all options:

$ vpn -h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.