Skip to content

Commit ed48f58

Browse files
committed
Add readme
1 parent 3474a86 commit ed48f58

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# OpenVPN 3 Action
2+
3+
This action starts a VPN session using OpenVPN 3 and give you the option to run
4+
any bash script during the session. We recommend you to store your config files
5+
in GitHub using [encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
6+
7+
**Reference Links:**
8+
9+
- [OpenVPN 3 for Linux](https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/)
10+
- [OpenVPN 3 and auth-user-pass](https://openvpn.net/blog/openvpn-3-linux-and-auth-user-pass/)
11+
- [GitHub Encrypted Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)
12+
13+
# Usage
14+
15+
```yaml
16+
- uses: dbritto-dev/openvpn3-action@main
17+
with:
18+
# Description: OpenVPN 3 profile file (.ovpn/.conf).
19+
# Encoded: Base64
20+
# Required: true
21+
vpn-client-config: ""
22+
# Description: OpenVPN 3 Autoload config file (.autoload). If this input is provided we use
23+
# `openvpn3-autoload` instead of `openvpn3` to start the VPN session.
24+
# OpenVPN 3 does support `auth-user-pass` through `openvpn3-autoload` utility.
25+
# To read more about OpenVPN 3 and `auth-user-pass` go to https://openvpn.net/blog/openvpn-3-linux-and-auth-user-pass/
26+
# Encoded: Base64
27+
# Required: false
28+
# Default: ''
29+
vpn-autoload-config: ""
30+
# Description: Bash script to run after the session was started and before the session was closed.
31+
# Required: true
32+
script: |
33+
echo "Hello Developer!"
34+
```
35+
36+
# Scenarios
37+
38+
- [Basic usage using OpenVPN 3 profile](#basic-usage-using-openvpn-3-profile)
39+
- [Using OpenVPN 3 profile wih auth-user-pass](#using-openvpn-3-profile-wih-auth-user-pass)
40+
41+
## Using OpenVPN 3 profile
42+
43+
```yaml
44+
on: [push]
45+
46+
jobs:
47+
testing:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: dbritto-dev/openvpn3-action@main
51+
with:
52+
vpn-client-config: ${{ secrets.VPN_CLIENT_CONFIG }}
53+
script: |
54+
sudo openvpn3 sessions-list
55+
```
56+
57+
## Using OpenVPN 3 profile wih auth-user-pass
58+
59+
```yaml
60+
on: [push]
61+
62+
jobs:
63+
testing:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: dbritto-dev/openvpn3-action@main
67+
with:
68+
vpn-client-config: ${{ secrets.VPN_CLIENT_CONFIG }}
69+
vpn-autoload-config: ${{ secrets.VPN_AUTOLOAD_CONFIG }}
70+
script: |
71+
sudo openvpn3 sessions-list
72+
```
73+
74+
# License
75+
76+
The scripts and documentation in this project are released under the [MIT License](/LICENSE)

0 commit comments

Comments
 (0)