Skip to content

Commit b9bc46b

Browse files
committed
update README.md
1 parent 610466c commit b9bc46b

1 file changed

Lines changed: 3 additions & 151 deletions

File tree

README.md

Lines changed: 3 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## IMPORTANT
88

9-
The tool is in experimental mode, so it is important to know which parts of the Linux system are affected:
9+
The client is in experimental mode, so it is important to know which parts of the Linux system are affected:
1010

1111
- Configuration files in user's config directory:
1212
- Session info: `~/.config/mbvpn/config.yml`
@@ -18,13 +18,11 @@ The tool is in experimental mode, so it is important to know which parts of the
1818

1919
### Prerequisites
2020

21-
WireGuard tools are required for MBVPN to function properly. Install them using your distribution's package manager:
21+
WireGuard tools are required for MBVPN to function properly. Install them using your distribution's package manager. For example:
2222

2323
- **Ubuntu/Debian**: `sudo apt install wireguard wireguard-tools`
2424
- **Fedora**: `sudo dnf install wireguard-tools`
25-
- **CentOS/RHEL**: `sudo yum install wireguard-tools`
2625
- **Arch Linux**: `sudo pacman -S wireguard-tools`
27-
- **openSUSE**: `sudo zypper install wireguard-tools`
2826

2927
### Installation via Go Package Manager (Recommended)
3028

@@ -34,61 +32,11 @@ Install MBVPN directly using Go's package manager:
3432
go install github.com/Malwarebytes/mbvpn-linux@latest
3533
```
3634

37-
> **Note**: Ensure that your `$GOPATH/bin` (typically `~/go/bin`) is in your `$PATH` to run the `mbvpn` command.
38-
3935
### Alternative: Download from Releases
4036

4137
1. Download the latest release for your architecture from the [Releases](https://github.com/Malwarebytes/mbvpn-linux/releases) page
4238
2. Extract the binary and place it in a directory in your `$PATH` (e.g., `/usr/local/bin`)
4339

44-
## Build Configuration
45-
46-
MBVPN can be built with different configurations using the following matrix:
47-
48-
| Environment | Build Type | Command | Use Case |
49-
|-------------|------------|----------------------|--------------------------------------------------|
50-
| Staging | Debug | `make build-st-debug` | Development and testing against staging |
51-
| Staging | Release | `make build-st-release`| Pre-production testing against staging |
52-
| Production | Debug | `make build-debug`| Troubleshooting against production |
53-
| Production | Release | `make build-release`| Final production builds |
54-
55-
Default commands:
56-
- `make build-st`: Creates a staging release build
57-
- `make build-release`: Creates a production release build
58-
59-
### Build Types
60-
61-
- **Debug builds**: Include additional debugging symbols and provide more detailed logs
62-
- **Release builds**: Optimized builds with minimal debug information
63-
64-
You can check your build configuration with the command:
65-
```
66-
mbvpn version
67-
```
68-
69-
## Testing
70-
71-
### Integration and E2E Tests
72-
73-
```bash
74-
# Run integration tests
75-
go test -tags=integration ./test/integration/...
76-
77-
# Run specific integration test
78-
go test -tags=integration ./test/integration/ -run TestRegisterDevice
79-
80-
# Run e2e tests
81-
go test -tags=e2e ./test/e2e/...
82-
```
83-
84-
For security reasons, the tests require a license key to be provided through an environment variable. Before running tests, you must set:
85-
86-
```bash
87-
export MBVPN_TEST_LICENSE_KEY="your-license-key-here"
88-
```
89-
90-
Tests will fail if this environment variable is not set.
91-
9240
## Usage
9341

9442
> You can access help information using `mbvpn --help` or `mbvpn <command> --help` if you want to read details about specific commands.
@@ -123,102 +71,6 @@ Check connection status:
12371
End your session:
12472
`mbvpn logout`
12573

126-
### Reducing Sudo Password Prompts
127-
128-
The `connect` (alias `c`), `disconnect` (alias `d`), and `status` commands require root privileges to manage WireGuard interfaces because they internally call WireGuard tools using sudo. To reduce the frequency of sudo password prompts, you need to configure sudo to allow passwordless execution of the WireGuard commands:
129-
130-
1. Create a dedicated sudoers file:
131-
132-
```bash
133-
sudo visudo -f /etc/sudoers.d/wireguard
134-
```
135-
136-
2. Add the following content (replace `username` with your actual username):
137-
138-
```
139-
# Allow user to run WireGuard commands without password
140-
username ALL=(ALL) NOPASSWD: /usr/bin/wg, /usr/bin/wg-quick
141-
```
142-
143-
3. Set the correct permissions:
144-
145-
```bash
146-
sudo chmod 440 /etc/sudoers.d/wireguard
147-
```
148-
149-
4. Test your configuration by running one of the mbvpn commands that require WireGuard tools:
150-
151-
```bash
152-
mbvpn status
153-
```
154-
155-
You should no longer be prompted for a password when running `mbvpn status`, `mbvpn connect`, or `mbvpn disconnect` commands.
156-
157-
This allows you to run the specified commands without entering a password, while still requiring the `sudo` prefix.
158-
159-
## Debug Mode and Logging
160-
161-
MBVPN provides several options for controlling logging and debugging output:
162-
163-
### Debug and Trace Flags
164-
165-
MBVPN provides two levels of enhanced logging:
166-
167-
#### Debug Mode
168-
169-
Run any command in debug mode to see detailed logs:
170-
171-
```bash
172-
mbvpn --debug <command>
173-
```
174-
175-
The `--debug` flag enables:
176-
- Detailed error messages with stack traces
177-
- More verbose logging of operations
178-
- Display of underlying API calls and responses
179-
- WireGuard configuration details
180-
181-
#### Trace Mode
182-
183-
For maximum verbosity, use trace mode which includes full HTTP request/response details:
184-
185-
```bash
186-
mbvpn --trace <command>
187-
```
188-
189-
The `--trace` flag enables:
190-
- All debug mode features
191-
- Complete HTTP request and response dumps
192-
- Headers and payload contents of API communications
193-
- Detailed internal operation tracing
194-
- Useful for diagnosing connectivity issues or inspecting API behavior
195-
196-
### Debug Builds
197-
198-
Debug builds (created with `make build-*-debug` commands) provide enhanced debugging capabilities:
199-
- Additional diagnostic information
200-
- More comprehensive logging of operations
201-
- Better visibility into system interactions
202-
203-
For troubleshooting complex issues, use debug builds with the debug flag:
204-
```bash
205-
# Build a debug version first
206-
make build-debug
207-
208-
# Run with debug flag
209-
mbvpn --debug <command>
210-
```
211-
212-
### Log Levels
213-
214-
Debug logs are handled by the logrus library with the following behavior:
215-
- By default, only INFO level and above logs are shown (warnings, errors)
216-
- When using the `--debug` flag, DEBUG level logs are enabled, showing detailed operation information
217-
- When using the `--trace` flag, TRACE level logs are enabled, showing complete HTTP request/response details
218-
- HTTP requests, API responses, and internal operations are logged at DEBUG level
219-
- Network traces (full request/response details) are logged at TRACE level
220-
- Error details are always logged but only displayed to users in debug or trace mode
221-
22274
## Troubleshooting
22375

22476
### Login, logout and license issues
@@ -229,7 +81,7 @@ The `mbvpn logout` command deactivates your device (makes the license seat free)
22981

23082
### Cannot disconnect, lost internet access
23183

232-
Use `mbvpn disconnect` (without specifying a server). The tool will attempt to disconnect from all WireGuard connections.
84+
Use `sudo mbvpn disconnect` (without specifying a server). The tool will attempt to disconnect from all WireGuard connections.
23385

23486
If that doesn't help, manually disconnect using WireGuard directly:
23587
1. Find your connection: `wg show`

0 commit comments

Comments
 (0)