Skip to content

Commit

Permalink
Improve ReadME
Browse files Browse the repository at this point in the history
  • Loading branch information
eloravpn committed Dec 16, 2024
1 parent 3a4726d commit 36db235
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 80 deletions.
256 changes: 178 additions & 78 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

## Tutorial Video 📝

<div align="center">

<a href="https://t.me/EloraVPNManager/14">
<img src="https://raw.githubusercontent.com/maurodesouza/profile-readme-generator/master/src/assets/icons/social/youtube/default.svg" width="52" height="40" alt="youtube logo"/>
</a>

</div>

## 🚀 Features

### 🌍 Multi-Zone Management
Expand Down Expand Up @@ -138,43 +148,6 @@ graph TB
- Traffic encryption
- Secure protocols

## 📖 Usage Guidelines

### Administrator Tasks
1. Enable SSL and configure domains
2. Set up zones and servers
3. Monitor system health
4. Manage user accounts

### User Tasks
1. Purchase/activate account
2. Get subscription URL
3. Configure VPN client
4. Monitor usage via bot

## ⚡ Quick Start

1. **System Setup**
```bash
# Install required components
# Configure SSL
# Set up domains
```

2. **Zone Configuration**
```bash
# Configure zones
# Set up servers
# Enable synchronization
```

3. **Account Management**
```bash
# Create accounts
# Monitor usage
# Manage subscriptions
```

## ✨ Key Benefits

### For Users
Expand Down Expand Up @@ -202,7 +175,7 @@ graph TB

### Minimum Hardware Requirements
- CPU: 1 core
- RAM: 1 GB
- RAM: 2 GB
- Storage: 10 GB

### Prerequisites
Expand All @@ -215,19 +188,41 @@ The installation script will automatically install these dependencies, but for r

## Quick Installation

### One-Line Installation
Auto-detects your public IP address
```bash
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash
```
### Option 1: Custom Domain and Port (Recommended)

For full functionality, including subscription URLs and all features:

### Custom Domain and Port
```bash
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- \
--domain your-domain.com \
--port 8080
```

**Why use this method?**

- Ensures all features work correctly
- Enables subscription URL functionality
- Provides better security through domain validation
- Allows proper SSL certificate setup
- Required for production deployments

### Option 2: Quick One-Line Installation
Basic installation using auto-detected public IP (Limited functionality):

Auto-detects your public IP address
```bash
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash
```
**⚠️ Limitations of IP-based installation:**

* Subscription URLs will not function
* Some features may be restricted
* Not recommended for production use
* SSL certificate setup may be problematic
* Limited security features

Note: For production environments, always use Option 1 with a proper domain name.

### Full Custom Installation
```bash
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- \
Expand All @@ -254,6 +249,19 @@ curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/insta
| `--version` | Specific version to install | Latest version |


## Updating
To update the application, use one of these commands:

```bash
# Update to latest version
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- --update

# Update to specific version
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- --update --version v1.2.3
```
- Restart the service


### Domain/IP Configuration
- If no domain is specified, the installer will automatically detect and use your server's public IP
- If public IP detection fails, it will fall back to 'localhost'
Expand All @@ -262,14 +270,53 @@ curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/insta

## Post-Installation

### To listen on IPv6
Just change the configuration in /opt/elora-vpn/.env
### To see full log

`tail -f /var/log/elora-vpn/elora-vpn.log`

### Configuring IPv6 Support
If your server has IPv6 capability, you can enable IPv6 listening by following these steps:

**1. Access Control Panel**

Log in to your control panel with administrator credentials
Navigate to the Settings menu
Select the Basic tab


**2. Configure IPv6**

Locate the "Uvicorn Host" setting
Change the value from 0.0.0.0 to ::
Click Save to apply changes


**3. Apply Changes**

```
UVICORN_HOST=::
# Restart the panel to activate IPv6 support
sudo systemctl restart elora-vpn
```

#### Verify the service is running
`sudo systemctl status elora-vpn`

Verify IPv6 Connectivity
```
# Check if the service is listening on IPv6
sudo netstat -tulpn | grep elora-vpn
```

#### Test IPv6 connectivity (replace port if different)
`curl -6 http://[::1]:8080/`


Note: Ensure your firewall rules allow incoming connections on both IPv4 and IPv6 for your configured port.
### SSL Certificate Setup

SSL certificates are essential for:

- To work Subscription URL in all V2ray Clients!
- Secure subscription links for V2Ray clients
- Encrypted API communications
- Secure web interface access
Expand Down Expand Up @@ -300,24 +347,23 @@ After successful certification, your certificates will be located at:

#### 3. Update Configuration

Update .env File
Access your control panel by logging in with your administrator credentials
Navigate to the SSL configuration:

```bash
sudo nano /opt/elora-vpn/.env
Click on "Settings" in the main menu
Select the "SSL" tab from the available options

# Update these lines:
UVICORN_SSL_CERTFILE=/etc/letsencrypt/live/your-domain.com/fullchain.pem
UVICORN_SSL_KEYFILE=/etc/letsencrypt/live/your-domain.com/privkey.pem
SUBSCRIPTION_BASE_URL=https://your-domain.com:your-port/api/sub
```
Update .config File
Configure the certificate paths:

```bash
sudo nano /opt/elora-vpn/static/config.json
In the "SSL Certificate Path" field, enter the full path to your SSL certificate file (e.g., /etc/ssl/certs/your-certificate.crt)
In the "Private Key Path" field, enter the full path to your private key file (e.g., /etc/ssl/private/your-private-key.key)
Double-check that both paths are correct and the files are readable by the panel

Apply the changes:

Click "Save" or "Apply" to confirm your SSL configuration
Restart the panel service to apply the new SSL settings

# Update these line:
"BASE_URL": "https://your-domain.com:your-port/api",
```

#### 4. Enable Auto-Renewal
```bash
Expand Down Expand Up @@ -350,12 +396,78 @@ sudo systemctl restart elora-vpn
# View logs
sudo journalctl -u elora-vpn -f
```
### Configuration Guide

#### Configuration File
The primary configuration settings are stored in the .env file:

`nano '/opt/elora-vpn/.env`

You can customize the panel's behavior through two methods:

**1. Web Interface Settings**

Access the control panel's Settings menu to configure:

General system preferences
User management options
Security settings
Network configurations


**2. Environment File**

For advanced configurations, you can directly edit the .env file. This allows you to:

Set environment-specific variables
Configure database connections
Modify system paths
Enable debug modes
Set API keys and secrets
Define custom service endpoints

Note: After modifying the .env file, restart the panel services to apply changes:
`sudo systemctl restart elora-vpn`

_We recommend using the web interface for routine changes and the .env file for advanced system configurations. Always backup your configuration files before making significant changes._

## 📖 Usage Guidelines

### Administrator Tasks
1. Enable SSL and configure domains
2. Set up zones and servers
3. Monitor system health
4. Manage user accounts

### User Tasks
1. Purchase/activate account
2. Get subscription URL
3. Configure VPN client
4. Monitor usage via bot

## ⚡ Quick Start

1. **System Setup**
```bash
# Install required components
# Configure SSL
# Set up domains
```

2. **Zone Configuration**
```bash
# Configure zones
# Set up servers
# Enable synchronization
```

3. **Account Management**
```bash
# Create accounts
# Monitor usage
# Manage subscriptions
```

### Configuration
The main configuration file is located at:
```bash
/opt/elora-vpn/.env
```

### Default Paths
- Installation Directory: `/opt/elora-vpn`
Expand Down Expand Up @@ -491,18 +603,6 @@ If you encounter any issues:
- The `.env` file contains sensitive information and is readable only by root
- Default database user has limited permissions to only the necessary database

## Updating
To update the application, use one of these commands:

```bash
# Update to latest version
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- --update

# Update to specific version
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- --update --version v1.2.3
```
- Restart the service

## Uninstallation
To completely remove the application:
```bash
Expand Down
4 changes: 2 additions & 2 deletions src/telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if TELEGRAM_API_TOKEN or TELEGRAM_PAYMENT_API_TOKEN:
apihelper.proxy = {"http": TELEGRAM_PROXY_URL, "https": TELEGRAM_PROXY_URL}

if TELEGRAM_API_TOKEN is not None:
if TELEGRAM_API_TOKEN:
bot = TeleBot(TELEGRAM_API_TOKEN)

@app.on_event("startup")
Expand All @@ -39,7 +39,7 @@ def start_bot():
else:
logger.warn("Telegram Bot not set!")

if TELEGRAM_PAYMENT_API_TOKEN is not None:
if TELEGRAM_PAYMENT_API_TOKEN:
payment_bot = TeleBot(TELEGRAM_PAYMENT_API_TOKEN)

@app.on_event("startup")
Expand Down

0 comments on commit 36db235

Please sign in to comment.