Metadata-Version: 2.4
Name: proxy2vpn
Version: 0.1.3
Summary: Proxy2VPN Python utilities
Author-email: Serhii Khalymon <serhii.khalymon@pm.me>
License: MIT
Keywords: vpn,proxy,utilities
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: typer
Requires-Dist: ruamel.yaml
Requires-Dist: docker
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: towncrier; extra == "dev"

# Proxy2VPN

Python command-line interface for managing multiple VPN containers with Docker.

## Features
- Manage VPN credentials as reusable profiles
- Create and control VPN services
- Bulk start/stop operations
- Query and validate provider server locations
- Apply predefined presets for common setups

## Installation

### Using uv (recommended)
```bash
git clone https://github.com/eirenik0/proxy2vpn.git
cd proxy2vpn
uv sync
uv run proxy2vpn --help
```

### Using pip
```bash
git clone https://github.com/eirenik0/proxy2vpn.git
cd proxy2vpn
pip install -e .
proxy2vpn --help
```

## Quick Start
1. Create a profile file with your VPN credentials:
   ```bash
   mkdir -p profiles
   cat <<'EOF' > profiles/myprofile.env
   OPENVPN_USER=your_username
   OPENVPN_PASSWORD=your_password
   EOF
   ```

2. Register the profile:
   ```bash
   proxy2vpn profile create myprofile profiles/myprofile.env
   ```

3. Create and start a VPN service:
   ```bash
   proxy2vpn vpn create vpn1 myprofile --port 8888 --provider protonvpn --location "New York"
   proxy2vpn vpn start vpn1
   ```

4. View status and test connectivity:
   ```bash
   proxy2vpn vpn list
   proxy2vpn test vpn1
   ```

## Command overview

### Profiles
- `proxy2vpn profile create NAME ENV_FILE`
- `proxy2vpn profile list`
- `proxy2vpn profile delete NAME`

### VPN services
- `proxy2vpn vpn create NAME PROFILE [--port PORT] [--provider PROVIDER] [--location LOCATION]`
- `proxy2vpn vpn list`
- `proxy2vpn vpn start NAME`
- `proxy2vpn vpn stop NAME`
- `proxy2vpn vpn restart NAME`
- `proxy2vpn vpn logs NAME [--lines N] [--follow]`
- `proxy2vpn vpn delete NAME`

### Bulk operations
- `proxy2vpn bulk up`
- `proxy2vpn bulk down`
- `proxy2vpn bulk status`
- `proxy2vpn bulk ips`

### Server database
- `proxy2vpn servers update`
- `proxy2vpn servers list-providers`
- `proxy2vpn servers list-countries PROVIDER`
- `proxy2vpn servers list-cities PROVIDER COUNTRY`
- `proxy2vpn servers validate-location PROVIDER LOCATION`

### Presets
- `proxy2vpn preset list`
- `proxy2vpn preset apply PRESET SERVICE [--port PORT]`

### Testing
- `proxy2vpn test SERVICE` – verify that a proxy container is reachable

## Development

### Setup
```bash
# Install with development dependencies
uv sync
# or
pip install -e ".[dev]"
```

### Testing
```bash
# Run tests (if available)
pytest
```

### Changelog Management
This project uses [Towncrier](https://towncrier.readthedocs.io/) for changelog management:

```bash
# Add a news fragment for your changes
echo "Your feature description" > news/<PR_NUMBER>.feature.md

# Preview the changelog
make changelog-draft

# Build the changelog (maintainers)
make changelog VERSION=x.y.z
```

## License
MIT
