You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add comprehensive pre-commit hooks for code quality
- Set up pre-commit framework with hooks for Python, YAML, Ansible, and shell
- Configure ruff for Python linting and formatting
- Add yamllint for YAML validation
- Include ansible-lint and syntax checks
- Add shellcheck for shell scripts
- Create development documentation
- Auto-fix trailing whitespace and file endings
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,17 +45,17 @@ The easiest way to get an Algo server running is to run it on your local system
45
45
3. **Set your configuration options.** Open `config.cfg`in your favorite text editor. Specify the users you want to create in the `users` list. Create a unique user for each device you plan to connect to your VPN. You should also review the other options before deployment, as changing your mind about them later [may require you to deploy a brand new server](https://github.com/trailofbits/algo/blob/master/docs/faq.md#i-deployed-an-algo-server-can-you-update-it-with-new-features).
46
46
47
47
4. **Start the deployment.** Return to your terminal. In the Algo directory, run the appropriate script for your platform:
48
-
48
+
49
49
**macOS/Linux:**
50
50
```bash
51
51
./algo
52
52
```
53
-
53
+
54
54
**Windows:**
55
55
```powershell
56
56
.\algo.ps1
57
57
```
58
-
58
+
59
59
The first time you run the script, it will automatically install the required Python environment (Python 3.11+). On subsequent runs, it starts immediately and works on all platforms (macOS, Linux, Windows via WSL). The Windows PowerShell script automatically uses WSL when needed, since Ansible requires a Unix-like environment. There are several optional features available, none of which are required fora fully functional VPN server. These optional features are describedin the [deployment documentation](docs/deploy-from-ansible.md).
60
60
61
61
That's it! You can now set up clients to connect to your VPN. Proceed to [Configure the VPN Clients](#configure-the-vpn-clients) below.
@@ -264,6 +264,14 @@ If you've read all the documentation and have further questions, [create a new d
264
264
265
265
-- [Thorin Klosowski](https://twitter.com/kingthor) for [Lifehacker](http://lifehacker.com/how-to-set-up-your-own-completely-free-vpn-in-the-cloud-1794302432)
266
266
267
+
## Contributing
268
+
269
+
See our [Development Guide](docs/DEVELOPMENT.md) for information on:
wsl bash -c "cd /mnt/c/$currentDir 2>/dev/null || (echo 'Error: Cannot access directory in WSL. Make sure you are running from a Windows drive (C:, D:, etc.)' && exit 1) && ./algo $allArgs"
69
69
}
70
-
70
+
71
71
if ($LASTEXITCODE-ne0) {
72
72
Write-Host""
73
73
Write-Host"Algo finished with exit code: $LASTEXITCODE"-ForegroundColor Yellow
@@ -93,7 +93,7 @@ try {
93
93
# Check if we're actually running inside WSL
94
94
if (Test-RunningInWSL) {
95
95
Write-Host"Detected WSL environment. Running Algo using standard Unix approach..."
96
-
96
+
97
97
# Verify bash is available (should be in WSL)
98
98
if (-not (Get-Command bash -ErrorAction SilentlyContinue)) {
99
99
Write-Host"ERROR: Running in WSL but bash is not available."-ForegroundColor Red
@@ -102,15 +102,15 @@ try {
102
102
Write-Host" wsl"-ForegroundColor Cyan
103
103
exit1
104
104
}
105
-
105
+
106
106
# Run the standard Unix algo script
107
107
& bash -c "./algo $($Arguments-join'')"
108
108
exit$LASTEXITCODE
109
109
}
110
-
110
+
111
111
# We're on native Windows - need to use WSL
112
112
Invoke-AlgoInWSL$Arguments
113
-
113
+
114
114
} catch {
115
115
Write-Host""
116
116
Write-Host"UNEXPECTED ERROR:"-ForegroundColor Red
@@ -121,4 +121,4 @@ try {
121
121
Write-Host"2. See troubleshooting guide: https://github.com/trailofbits/algo/blob/master/docs/deploy-from-windows.md"
122
122
Write-Host"3. Or use WSL directly: open Ubuntu and run './algo'"
0 commit comments