Giter Site home page Giter Site logo

morriz / github-openvpn-connect-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kota65535/github-openvpn-connect-action

0.0 0.0 0.0 525 KB

GitHub Action for connecting to OpenVPN server.

License: MIT License

Shell 1.87% JavaScript 98.13%

github-openvpn-connect-action's Introduction

github-openvpn-connect-action

NOTE: Forked from kota65535/github-openvpn-connect-action to have more control over OVPN params.

GitHub Action for connecting to OpenVPN server.

Inputs

General Inputs

Name Description Required
config_file Location of OpenVPN client config file yes
host Host address of vpn server Not provided in .ovpn
port Port (default: 1194) Optional
protocol Protocol (default: udp4) Optional

Authentication Inputs

Supported authentication methods:

  • Username & password auth
  • Client certificate auth
  • Both of them
Name Description Required when
username Username Username-password auth
password Password Username-password auth
ca CA that signed the private key Client certificate auth
cert CA's signing certificate Client certificate auth
client_key Local peer's private key Client certificate auth
client_pass Local peer's private key's passphrase Client certificate auth
tls_auth_key Pre-shared group key for TLS Auth Optional
tls_crypt_key Pre-shared group key for TLS Crypt Optional
tls_crypt_v2_key Per-client key for TLS Crypt V2 Optional

Note: It is strongly recommended that you provide all credentials via encrypted secrets.

When providing TLS keys, you should provide only one of either tls_auth_key, tls_crypt_key or tls_crypt_v2_key. You can determine which by checking the value of your key and looking in the header line. See the docs for more info about TLS in OpenVPN

Usage

  • Create client configuration file based on the official sample and place at .github/workflows/client.ovpn. You may use inline certificates to include them directly in configuration file, and omit them from the action inputs, but one is warned not to hardcode sensitive data in this file. Remove all parts that have a corresponding key in the action inputs (see below).
  • Usage in your workflow is like following:
- name: Checkout
  uses: actions/checkout@v3
- name: Install OpenVPN
  run: |
    sudo apt update
    sudo apt install -y openvpn openvpn-systemd-resolved
- name: Connect to VPN
  uses: "Morriz/github-openvpn-connect-action@v3"
  with:
    config_file: .github/workflows/client.ovpn
    host: ${{ secrets.OVPN_HOST }}
    username: ${{ secrets.OVPN_USERNAME }}
    password: ${{ secrets.OVPN_PASSWORD }}
    port: ${{ secrets.OVPN_PORT }} # default: 1194
    protocol: ${{ secrets.OVPN_PROTOCOL }} # default: udp4
    ca: ${{ secrets.OVPN_CA }}
    cert: ${{ secrets.OVPN_CERT }}
    client_key: ${{ secrets.OVPN_CLIENT_KEY }}
    client_pass: ${{ secrets.OVPN_CLIENT_PASS }}
    tls_auth_key: ${{ secrets.OVPN_TLS_AUTH_KEY }}
- name: Build something
  run: ./gradlew clean build
# The openvpn process is automatically terminated in post-action phase

License

MIT

github-openvpn-connect-action's People

Contributors

kota65535 avatar kylebjordahl avatar morriz avatar mvaerle avatar renovate[bot] avatar

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.