-
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.
Make
vpn-server
a package and onboard to pypi
- Loading branch information
1 parent
d9efeca
commit 618ac8f
Showing
10 changed files
with
391 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
Change Log | ||
========== | ||
|
||
0.4.6 (01/09/2022) | ||
------------------ | ||
- Make `vpn-server` a package and onboard to pypi | ||
|
||
0.4.5 (01/09/2022) | ||
------------------ | ||
- Automate onboarding to pypi | ||
|
||
0.4.4 (01/09/2022) | ||
------------------ | ||
- Remove `os.system` usage and introduce hybrid logger | ||
|
||
0.4.3 (01/09/2022) | ||
------------------ | ||
- Add a note on firewall configuration ports | ||
|
||
0.4.2 (01/02/2022) | ||
------------------ | ||
- Change sensitive values to a list to hide from logs | ||
- Do not log server info | ||
|
||
0.4.1 (01/02/2022) | ||
------------------ | ||
- Hide port number and password from the logs | ||
- Add timeout and display options as arguments | ||
- Add one more option to test/update existing connection | ||
|
||
0.4.0 (01/01/2022) | ||
------------------ | ||
- Add more logging and remove unnecessary args | ||
- Pass the initial 'yes' as part of the configuration dict | ||
- Bump timeout to 30 seconds | ||
|
||
0.3.9 (01/01/2022) | ||
------------------ | ||
- Restructure static methods into a single module | ||
|
||
0.3.8 (01/01/2022) | ||
------------------ | ||
- Use paramiko for interactive ssh commands | ||
- Get rid of the OS limitation | ||
- Improve the overall speed of configuration | ||
- Add an option to reconfigure | ||
|
||
0.3.7 (12/31/2021) | ||
------------------ | ||
- Upgrade gmailconnector version | ||
- Update year in LICENSE file | ||
|
||
0.3.6 (10/04/2021) | ||
------------------ | ||
- Strip https from notification URL | ||
- Distinguish attempt wise notification | ||
- Log a warning message if env vars for notification is missing | ||
|
||
0.3.5 (09/24/2021) | ||
------------------ | ||
- FEATURE::Sends a notification when a second instance is triggered | ||
- Swap delete security group and sleeper | ||
|
||
0.3.4 (09/24/2021) | ||
------------------ | ||
- Simplify notification process | ||
- Add logs to .gitignore | ||
|
||
0.3.3 (09/23/2021) | ||
------------------ | ||
- Write only to file when triggered by Jarvis | ||
- Remove root logger | ||
- Move sleeper within class | ||
|
||
0.3.2 (09/23/2021) | ||
------------------ | ||
- Add `loggingWrapper` for file and console logging | ||
- Create log files when triggered by `Jarvis` | ||
- Add datetime to email subject to avoid threads | ||
|
||
0.3.1 (09/22/2021) | ||
------------------ | ||
- Add optional email notification upon vpn startup | ||
|
||
0.3.0 (09/21/2021) | ||
------------------ | ||
- Fix buggy walrus operator which kept failing notifications | ||
- Reduce file IO operations | ||
- Strip https from url in notification | ||
- Increase wait time while shutting down vpn | ||
- Modify sleeper in _instance_info | ||
- Remove optional arguments | ||
|
||
0.2.9 (09/21/2021) | ||
------------------ | ||
- Split sleep time as its own function to avoid redundancy | ||
|
||
0.2.8 (09/21/2021) | ||
------------------ | ||
- Log results of notification | ||
- Change method name to avoid conflict with module | ||
- Add waiting time for file IO to finish | ||
|
||
0.2.7 (09/20/2021) | ||
------------------ | ||
- Add a feature to send login details via SMS | ||
- Update requirements.txt and docstrings | ||
|
||
0.2.6 (09/20/2021) | ||
------------------ | ||
- Add custom `PORT` number feature | ||
|
||
0.2.5 (09/20/2021) | ||
------------------ | ||
- Add `VPN_USERNAME` option for custom login info | ||
- Write region name in `server_info.json` | ||
- Add a color to terminal | ||
- Update README.md and docstrings | ||
|
||
0.2.4 (09/20/2021) | ||
------------------ | ||
- Update styling in `README.md` to populate in sphinx docs | ||
|
||
0.2.3 (09/20/2021) | ||
------------------ | ||
- Use region specific AMI IDs | ||
- Add more info on env vars to README.md | ||
- Clean up and update docstrings | ||
|
||
0.2.2 (09/20/2021) | ||
------------------ | ||
- Redirect client traffic via VPN automatically | ||
- Update README.md and add applescript in docstring | ||
|
||
0.2.1 (09/20/2021) | ||
------------------ | ||
- Optionally load `env-vars` from `.env` file | ||
|
||
0.2.0 (09/20/2021) | ||
------------------ | ||
- Make script to initiate only from `commandline` | ||
- Don't exit script until `SecurityGroup` is deleted | ||
- Update requirements.txt and docs | ||
|
||
0.1.9 (09/16/2021) | ||
------------------ | ||
- Change branch name to `main` to pick up page build | ||
|
||
0.1.8 (09/16/2021) | ||
------------------ | ||
- Add manual config info for `Windows OS` | ||
- Clean up | ||
- Update README.md and docs | ||
|
||
0.1.7 (09/16/2021) | ||
------------------ | ||
- FEATURE::Spins up a VPN Server on EC2 with a single click | ||
- Add all the automation bits | ||
- Add time converter to calculate run time | ||
- Add an apple script for the automation | ||
- Add functionality to re-use AWS resources | ||
|
||
0.1.6 (09/16/2021) | ||
------------------ | ||
- Setup github action for docs | ||
|
||
0.1.5 (09/15/2021) | ||
------------------ | ||
- Add features to create and delete `SecurityGroups` | ||
- Reconfigure flow of code | ||
- Update docstrings and docs | ||
|
||
0.1.4 (09/15/2021) | ||
------------------ | ||
- Proceed to terminate instance even when `KeyPair` deletion fails | ||
- Add access key and secret id as optional arguments during class initialization | ||
|
||
0.1.3 (09/15/2021) | ||
------------------ | ||
- First automation to add `ip` and `host` entry in known_hosts file | ||
|
||
0.1.2 (09/15/2021) | ||
------------------ | ||
- Delete recent instance if an instance id is not provided to terminate | ||
- Delete instance_info.json while terminating an instance | ||
|
||
0.1.1 (09/14/2021) | ||
------------------ | ||
- Onboard sphinx auto docs | ||
- Add pre-commit and sync up with doc generation | ||
- Rename repo from openvpn to vpn-server | ||
|
||
0.1.0 (09/14/2021) | ||
------------------ | ||
- Update README.md | ||
|
||
0.0.9 (09/14/2021) | ||
------------------ | ||
- Wrap everything inside a class and add docstrings | ||
|
||
0.0.8 (09/14/2021) | ||
------------------ | ||
- Add exception handlers where necessary | ||
|
||
0.0.7 (09/14/2021) | ||
------------------ | ||
- Get public dns name and public ip address and write as JSON | ||
|
||
0.0.6 (09/14/2021) | ||
------------------ | ||
- Add functions to delete keypair and terminate instance | ||
|
||
0.0.5 (09/14/2021) | ||
------------------ | ||
- Add logging instead of print statements | ||
|
||
0.0.4 (09/14/2021) | ||
------------------ | ||
- Create pem file while spinning up an instance | ||
|
||
0.0.3 (09/14/2021) | ||
------------------ | ||
- Base script to create an instance using an AMI ID | ||
- Add `requirements.txt` | ||
|
||
0.0.2 (09/14/2021) | ||
------------------ | ||
- Update LICENSE, README.md and add .gitignore | ||
|
||
0.0.1 (09/14/2021) | ||
------------------ | ||
- Initial commit |
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,5 @@ | ||
recursive-include vpnserver * | ||
recursive-exclude venv * | ||
recursive-exclude docs * | ||
recursive-exclude doc_generator * | ||
exclude gen_docs.sh .gitignore .pre-commit-config.yaml |
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,3 @@ | ||
from version import version_info | ||
|
||
version = '.'.join(str(c) for c in version_info) |
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,30 @@ | ||
[metadata] | ||
name = vpn-server | ||
version = attr: version | ||
description = 'Create on demand VPN Server running with OpenVPN using AWS EC2 and Python', | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown; charset=UTF-8 | ||
url = https://github.com/thevickypedia/vpn-server | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[options] | ||
packages = find: | ||
|
||
[flake8] | ||
ignore = D100 | ||
max_line_length = 100 | ||
exclude = | ||
# this is generally an empty file. | ||
doc_generator | ||
docs | ||
venv | ||
|
||
# install flake8-docstrings | ||
docstring_convention = google | ||
|
||
# install flake8-sfs | ||
extend_ignore=SFS3,D107,SFS301,D100,D104,D401 | ||
|
||
[isort] |
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,64 @@ | ||
from os.path import dirname, isfile, join, realpath, sep | ||
|
||
from setuptools import setup | ||
|
||
from version import version_info | ||
|
||
classifiers = [ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Information Technology', | ||
'Operating System :: MacOS :: MacOS X', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3.9', | ||
'Topic :: System :: Networking :: Firewalls' | ||
] | ||
|
||
|
||
def read(name): | ||
"""Reads the file that was received as argument. | ||
Args: | ||
name: Name of the file that has to be opened and read. | ||
Returns: | ||
Content of the file that was read. | ||
References: | ||
https://pythonhosted.org/an_example_pypi_project/setuptools.html#setting-up-setup-py | ||
""" | ||
with open(join(dirname(__file__), name)) as file: | ||
content = file.read() | ||
return content | ||
|
||
|
||
def dependencies() -> list: | ||
"""Gathers dependencies from requirements file. | ||
Returns: | ||
List of dependencies to be installed. | ||
""" | ||
requirement_file = dirname(realpath(__file__)) + f'{sep}vpn{sep}requirements.txt' | ||
if isfile(requirement_file): | ||
with open(requirement_file) as requirements: | ||
install_requires = requirements.read().splitlines() | ||
return install_requires | ||
|
||
|
||
setup( | ||
name='vpn-server', | ||
version='.'.join(str(c) for c in version_info), | ||
description='Create an on demand VPN Server running with OpenVPN using AWS EC2.', | ||
long_description=read('README.md') + '\n\n' + read('CHANGELOG'), | ||
url='https://github.com/thevickypedia/vpn-server', | ||
author='Vignesh Sivanandha Rao', | ||
author_email='svignesh1793@gmail.com', | ||
License='MIT', | ||
classifiers=classifiers, | ||
keywords='openvpn-server, vpn-server, aws-ec2', | ||
packages=['.vpn'], | ||
install_requires=dependencies(), | ||
project_urls={ | ||
'Docs': 'https://thevickypedia.github.io/vpn-server', | ||
'Bug Tracker': 'https://github.com/thevickypedia/vpn-server/issues' | ||
}, | ||
) |
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 @@ | ||
version_info = (0, 4, 6) |
Oops, something went wrong.