-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
300 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue) | ||
|
||
###### Platform Supported | ||
![Generic badge](https://img.shields.io/badge/Platform-MacOS|Windows-1f425f.svg) | ||
|
||
###### Repo Stats | ||
[![GitHub](https://img.shields.io/github/license/thevickypedia/vpn-server)][LICENSE] | ||
[![GitHub repo size](https://img.shields.io/github/repo-size/thevickypedia/vpn-server)][API_REPO] | ||
[![GitHub code size](https://img.shields.io/github/languages/code-size/thevickypedia/vpn-server)][API_REPO] | ||
|
||
###### Deployments | ||
[![pages-build-deployment](https://github.com/thevickypedia/vpn-server/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/vpn-server/actions/workflows/pages/pages-build-deployment) | ||
[![pypi](https://github.com/thevickypedia/vpn-server/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/vpn-server/actions/workflows/python-publish.yml) | ||
|
||
[![Pypi-format](https://img.shields.io/pypi/format/vpn-server)](https://pypi.org/project/vpn-server/#files) | ||
[![Pypi-status](https://img.shields.io/pypi/status/vpn-server)](https://pypi.org/project/vpn-server) | ||
[![sourcerank](https://img.shields.io/librariesio/sourcerank/pypi/vpn-server)](https://libraries.io/pypi/vpn-server) | ||
|
||
# VPN Server | ||
Establish a scalable, on-demand VPN Server powered by OpenVPN on AWS EC2. | ||
|
||
### Install | ||
```shell | ||
python -m pip install vpn-server | ||
``` | ||
|
||
### Usage | ||
```python | ||
import vpn | ||
|
||
# Instantiates the object | ||
vpn_server = vpn.VPNServer() | ||
|
||
# Create a VPN Server | ||
vpn_server.create_vpn_server() | ||
|
||
# Test an existing VPN Server | ||
# vpn_server.test_vpn() | ||
|
||
# Deletes the VPN Server | ||
vpn_server.delete_vpn_server() | ||
``` | ||
|
||
> :bulb: Please refer to the [wiki page](https://github.com/thevickypedia/vpn-server/wiki) for more usage instructions and payload requirements. | ||
## Coding Standards | ||
Docstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) <br> | ||
Styling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/) <br> | ||
Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and | ||
[`isort`](https://pycqa.github.io/isort/) | ||
|
||
### [Release Notes](https://github.com/thevickypedia/vpn-server/blob/main/release_notes.rst) | ||
**Requirement** | ||
```shell | ||
python -m pip install gitverse | ||
``` | ||
|
||
**Usage** | ||
```shell | ||
gitverse-release reverse -f release_notes.rst -t 'Release Notes' | ||
``` | ||
|
||
### Linting | ||
`PreCommit` will ensure linting, and the doc creation are run on every commit. | ||
|
||
**Requirement** | ||
```shell | ||
pip install sphinx==5.1.1 pre-commit recommonmark | ||
``` | ||
|
||
**Usage** | ||
```shell | ||
pre-commit run --all-files | ||
``` | ||
|
||
## Project Links | ||
[Wiki](https://github.com/thevickypedia/vpn-server/wiki) | ||
|
||
[Repository](https://github.com/thevickypedia/vpn-server) | ||
|
||
[Runbook](https://thevickypedia.github.io/vpn-server/) | ||
|
||
[Package](https://pypi.org/project/vpn-server/) | ||
|
||
## License & copyright | ||
|
||
© Vignesh Rao | ||
|
||
Licensed under the [MIT License][LICENSE] | ||
|
||
[LICENSE]: https://github.com/thevickypedia/vpn-server/blob/main/LICENSE | ||
[API_REPO]: https://api.github.com/repos/thevickypedia/vpn-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
# 'set -e' stops the execution of a script if a command or pipeline has an error. | ||
# This is the opposite of the default shell behaviour, which is to ignore errors in scripts. | ||
set -e | ||
|
||
clean_docs() { | ||
rm -rf docs && mkdir docs | ||
} | ||
|
||
update_release_notes() { | ||
# Update release notes | ||
gitverse-release reverse -f release_notes.rst -t 'Release Notes' | ||
} | ||
|
||
gen_docs() { | ||
# Generate sphinx docs | ||
mkdir -p doc_gen/_static # Create a _static directory if unavailable | ||
cp README.md doc_gen # Copy readme file to doc_gen | ||
cd doc_gen && make clean html # cd into doc_gen and create the runbook | ||
mv _build/html/* ../docs && mv README.md ../docs # Move the runbook, readme and cleanup | ||
cp static.css ../docs/_static | ||
} | ||
|
||
run_pytest() { | ||
# Run pytest | ||
python -m pytest | ||
} | ||
|
||
gen_docs & | ||
clean_docs & | ||
update_release_notes & | ||
|
||
wait | ||
|
||
# The existence of this file tells GitHub Pages not to run the published files through Jekyll. | ||
# This is important since Jekyll will discard any files that begin with _ | ||
touch docs/.nojekyll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.