Skip to content

Commit

Permalink
Add variables to env file creation and prompt if VPN enabled; Fix use…
Browse files Browse the repository at this point in the history
… case wording
  • Loading branch information
parkeraddison committed Mar 8, 2021
1 parent 8ccfb24 commit 867684d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/background/uses.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ sort: 2
- You can use a different network monitoring tool, like [TShark](https://tshark.dev/) to collect full packet captures by modifying the client's Dockerfile and collection.py script
- Collect data that resembles real-world client data
- By modifying the client Dockerfile, you can have the container run background services that add realistic noise to your network data
- See what different network conditions look like first hand
- Use a browser window attached to emulated network conditions, see the user experience first hand
- If you really want to hack the tool, you can connect a VNC to the client containers to run their browser windows as a GUI application!
24 changes: 19 additions & 5 deletions setup/build_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,27 @@ def main(tool_dir, config_file, env_file, data_dir):

if not path_to_check.exists():
print(f"""
Looks like your environment file doesn't exist yet.
Path: {path_to_check}
Looks like your environment file doesn't exist yet. Path: {path_to_check}
We'll go ahead and create the file for you.
""")
with open(path_to_check, 'w') as outfile:
outfile.write("""
VPN_USERNAME=
VPN_USERGROUP=
VPN_PASSWORD=
""")

if config['vpn']['enabled']:
print(f"""
Since you have the VPN enabled, you'll need to add your login credentials now.
If you need guidance, consult https://dane-tool.github.io/dane/guide/quickstart
""")
input(f"Please add your VPN login credentials to {path_to_check} and press Enter when you're done.")

We'll go ahead and create an empty file for you, but make sure to fill it in
with your login credentials if you plan on using a VPN! Check the documentation.
else:
print(f"""
Make sure to add your login credentials to the file if you plan on using a VPN!
""")
path_to_check.touch()

env_file = '../.env'
else:
Expand Down

0 comments on commit 867684d

Please sign in to comment.