HTTP Basic Auth
Protect your tunnels with username and password authentication.
Enable HTTP Basic Auth
Add --auth flag to require authentication for accessing your tunnel:
bash
drip http 3000 --auth <password>Anyone accessing your tunnel URL will be prompted for credentials.
Multiple Users
Specify multiple user:password pairs (comma-separated):
bash
drip http 3000 --auth <pass1>,<pass2>Combining with Other Options
Use HTTP auth with custom subdomain and background mode:
bash
drip http 3000 -n myapp --auth <password> -dCombine with IP restrictions for extra security:
bash
drip http 3000 --auth <password> --allow-ip 192.168.1.0/24How It Works
When HTTP Basic Auth is enabled:
- Browser displays a login prompt when accessing the tunnel URL
- Credentials are sent via the
Authorizationheader - Server validates credentials before forwarding the request
- Invalid credentials return
401 Unauthorized
Security Notes
- Credentials are transmitted over HTTPS (encrypted)
- Use strong passwords for production tunnels
- Consider combining with IP restrictions for sensitive services
- Auth is enforced at the tunnel level, not the local service
Use Cases
| Scenario | Command |
|---|---|
| Protect dev preview | drip http 3000 -n preview --auth <password> |
| Secure staging site | drip http 4000 -n staging --auth <password> -d |
| Share with client | drip http 3000 --auth <password> |
| Team access | drip http 8080 --auth <pass1>,<pass2> |
Comparison with ngrok
| Feature | Drip | ngrok |
|---|---|---|
| HTTP Basic Auth | Free, built-in | Paid plans only |
| Multiple users | Supported | Limited |
| Combined with IP rules | Yes | Separate feature |