Skip to content

VenoMexx/ProtoScope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” ProtoScope

ProtoScope is a comprehensive security testing tool for VPN/Proxy protocols. It tests subscription links for connectivity, performance, geo-access, DNS security, and privacy.

🎯 Powered by Sing-box - Universal support for all modern proxy protocols!

✨ Features

🌐 Protocol Support

Protocol Parse Test Status
VMess βœ… βœ… Fully Supported
VLESS βœ… βœ… Fully Supported
Trojan βœ… βœ… Fully Supported
Shadowsocks βœ… βœ… Fully Supported
Hysteria2 βœ… βœ… Fully Supported
TUIC βœ… βœ… Fully Supported

🎯 Powered by Sing-box: ProtoScope uses Sing-box as the universal backend for all protocols. Sing-box is a modern, feature-rich proxy platform that supports:

  • βœ… Traditional protocols (VMess, VLESS, Trojan, Shadowsocks)
  • βœ… Modern QUIC-based protocols (Hysteria2, TUIC)
  • βœ… Active development and excellent performance

This unified approach provides:

  • πŸš€ One backend for all - no switching between tools
  • πŸ“¦ Modern architecture - supports latest protocols
  • πŸ”„ Maximum compatibility - all protocols in one tool

πŸ”¬ Test Categories

1. Connectivity & Performance

  • Basic connection testing
  • Latency measurement (ping)
  • Download/Upload speed tests
  • Connection jitter analysis

2. Geo-Access Testing

  • RU Domains: vk.com, yandex.ru, mail.ru, rt.com
  • CN Domains: baidu.com, qq.com, weibo.com, taobao.com
  • IR Domains: isna.ir, farsnews.ir, tasnimnews.com
  • US Domains: google.com, youtube.com, facebook.com, twitter.com
  • Tests which geographic restrictions are bypassed

3. DNS Security

  • DNS Leak Detection: Checks if DNS queries leak to ISP
  • DNS Blocking: Tests if ads/tracking domains are blocked
    • Google Ads (googleadservices.com, doubleclick.net)
    • Tracking domains (google-analytics.com, facebook.com/tr)
    • Analytics services

4. Privacy & Security

  • DNS leak detection
  • WebRTC leak detection
  • IPv6 leak detection
  • Real IP exposure check
  • Security score (0-100)

πŸ“‹ Requirements

System Requirements

  • Go 1.20 or higher (for building from source)
  • Sing-box (required)

Installing Sing-box

Linux:

bash <(curl -fsSL https://sing-box.app/deb-install.sh)

macOS:

brew install sing-box

Windows: Download from Sing-box Releases

Verify:

sing-box version

Why Sing-box? ProtoScope uses Sing-box as the universal backend because it supports all protocols natively:

  • βœ… Traditional protocols (VMess, VLESS, Trojan, Shadowsocks)
  • βœ… Modern QUIC-based protocols (Hysteria2, TUIC)
  • βœ… Active development and excellent performance

πŸš€ Installation

From Source

git clone https://github.com/VenoMexx/ProtoScope.git
cd ProtoScope
go build -o protoscope ./cmd/protoscope

Using Go Install

go install github.com/VenoMexx/ProtoScope/cmd/protoscope@latest

πŸ“– Usage

Basic Usage

# Test a subscription URL (all protocols)
protoscope -url "https://example.com/subscription"

# Test only specific protocols
protoscope -url "https://example.com/subscription" -protocols vless,vmess
protoscope -url "https://example.com/subscription" -protocols tuic
protoscope -url "https://example.com/subscription" -protocols hysteria2,tuic

# Quick mode (connectivity only)
protoscope -url "https://example.com/subscription" -quick

# JSON output
protoscope -url "https://example.com/subscription" -format json

# Markdown report
protoscope -url "https://example.com/subscription" -format markdown > report.md

# Custom timeout and concurrency
protoscope -url "https://example.com/subscription" -timeout 60s -concurrent 10

# Verbose output
protoscope -url "https://example.com/subscription" -verbose

Command Line Options

-url string
    Subscription URL to test (required)

-format string
    Output format: console, json, markdown (default: console)

-timeout duration
    Timeout for each test (default: 30s)

-concurrent int
    Number of concurrent tests (default: 3)

-quick
    Quick mode - only connectivity tests

-verbose
    Enable verbose output with detailed results

-protocols string
    Filter protocols (comma-separated: vmess,vless,trojan,shadowsocks,hysteria2,tuic)
    Examples: "vless", "vmess,vless", "tuic,hysteria2"
    Default: test all protocols

-no-speed
    Disable speed tests (useful for faster testing)

-no-geo
    Disable geo-access tests

-no-dns
    Disable DNS leak and blocking tests

-no-privacy
    Disable privacy and security tests

Advanced Usage

# Test only connectivity (fastest)
protoscope -url <url> -quick

# Skip speed tests for faster results
protoscope -url <url> -no-speed

# Full test with verbose output
protoscope -url <url> -verbose

# Test with custom concurrency
protoscope -url <url> -concurrent 10

# Export results to JSON
protoscope -url <url> -format json > results.json

# Generate markdown report
protoscope -url <url> -format markdown > report.md

# Test only modern QUIC protocols
protoscope -url <url> -protocols hysteria2,tuic

# Test only traditional protocols
protoscope -url <url> -protocols vmess,vless,trojan,shadowsocks

# Quick test only VLESS protocols
protoscope -url <url> -protocols vless -quick

# Combine filters: test only Hysteria2 with full tests
protoscope -url <url> -protocols hysteria2 -verbose

πŸ“Š Example Output

Console Output

ProtoScope v0.1.0 - Protocol Security Tester
===========================================

Testing 15 protocols from subscription...

Protocol 1/15: HK-01 [vmess] βœ“
  β”œβ”€ Connectivity: Connected (245ms)
  β”œβ”€ Speed: ↓ 45.2 Mbps / ↑ 12.3 Mbps
  β”œβ”€ Geo Access:
  β”‚  β”œβ”€ RU: βœ“ Accessible (4/4 domains)
  β”‚  β”œβ”€ CN: βœ— Blocked (0/4 domains)
  β”‚  └─ IR: βœ“ Accessible (3/3 domains)
  β”œβ”€ DNS:
  β”‚  β”œβ”€ Leak: βœ“ No leak detected
  β”‚  └─ Ad Blocking: βœ— 0/10 ads blocked
  └─ Privacy:
     β”œβ”€ DNS Leak: βœ“ Safe
     β”œβ”€ IPv6 Leak: βœ“ Safe
     └─ Security Score: 90/100

Protocol 2/15: US-02 [hysteria2] βœ—
  └─ Connection failed: timeout

===========================================
Summary
===========================================
Total Protocols: 15
Working: 12 (80%)
Failed: 3 (20%)

Best Latency: HK-03 (89ms)
Best Speed: US-01 (78.5 Mbps)
Most Secure: HK-01, SG-02, JP-01 (Score: 90+)

JSON Output

[
  {
    "protocol": {
      "type": "vmess",
      "name": "HK-01",
      "server": "hk.example.com",
      "port": 443,
      "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "timestamp": "2025-11-11T20:00:00Z",
    "success": true,
    "connectivity": {
      "connected": true,
      "response_time": 245000000
    },
    "performance": {
      "latency": 245000000,
      "download_speed_mbps": 45.2,
      "upload_speed_mbps": 12.3
    },
    "geo_access": {
      "summary": {
        "total_tested": 15,
        "total_accessible": 12,
        "access_percentage": 80.0
      }
    },
    "dns": {
      "leak_detection": {
        "is_leaking": false
      },
      "blocking": {
        "summary": {
          "total_tested": 10,
          "total_blocked": 0
        }
      }
    },
    "privacy": {
      "dns_leak": false,
      "webrtc_leak": false,
      "ipv6_leak": false,
      "security_score": 90
    }
  }
]

πŸ—οΈ Architecture

ProtoScope/
β”œβ”€β”€ cmd/
β”‚   └── protoscope/          # CLI application
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ parser/              # Subscription parsers
β”‚   β”œβ”€β”€ tester/              # Protocol testers
β”‚   β”œβ”€β”€ checks/              # Test modules
β”‚   β”‚   β”œβ”€β”€ connectivity.go  # Connection tests
β”‚   β”‚   β”œβ”€β”€ performance.go   # Speed & latency
β”‚   β”‚   β”œβ”€β”€ geo.go          # Geo-access tests
β”‚   β”‚   β”œβ”€β”€ dns.go          # DNS leak & blocking
β”‚   β”‚   └── privacy.go      # Privacy tests
β”‚   β”œβ”€β”€ metrics/             # Performance metrics
β”‚   └── reporter/            # Report generation
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ models/              # Data models
β”‚   └── domains/             # Test domain lists
└── configs/                 # Configuration files

πŸ§ͺ Test Methodology

Connectivity Test

  1. Establish connection through proxy
  2. Make HTTP request to test endpoint
  3. Measure connection time
  4. Verify data transmission

Geo-Access Test

  1. Attempt to connect to geo-specific domains
  2. Test both HTTP and HTTPS
  3. Record accessibility and response times
  4. Categorize by region

DNS Leak Test

  1. Query external DNS leak detection APIs
  2. Compare detected DNS servers with proxy location
  3. Check for ISP DNS exposure
  4. Verify DNS routing through proxy

DNS Blocking Test

  1. Attempt to resolve ad/tracking domains
  2. Try HTTP/HTTPS connections
  3. Categorize block type (DNS/HTTP/None)
  4. Calculate blocking percentage

Privacy Test

  1. Get public IP through proxy
  2. Check for WebRTC leaks
  3. Test IPv6 connectivity
  4. Calculate security score

πŸ”’ Security & Privacy

ProtoScope is designed for authorized testing only:

  • βœ… Test your own VPN/proxy subscriptions
  • βœ… Evaluate service quality and security
  • βœ… Check for DNS/IP leaks
  • ❌ Do not test unauthorized services
  • ❌ Do not use for malicious purposes

πŸ› οΈ Development

Requirements

  • Go 1.20 or higher
  • Internet connection for testing

Building

go build -o protoscope ./cmd/protoscope

Testing

go test ./...

Adding Custom Domains

Edit configs/domains.yaml to add custom test domains:

geo_domains:
  custom:
    - example.com
    - custom-site.net

dns_blocking:
  custom_ads:
    - custom-ad-domain.com

πŸ“ Roadmap

  • Basic subscription parsing
  • Protocol models (VMess, VLESS, Trojan, Hysteria2)
  • Connectivity testing
  • Performance testing
  • Geo-access testing
  • DNS leak detection
  • DNS blocking tests
  • Privacy tests
  • Sing-box integration for all protocols
  • Full test runner implementation
  • Multiple output formats (console, JSON, markdown)
  • Universal Sing-box backend
  • All protocols support (VMess, VLESS, Trojan, Shadowsocks, Hysteria2, TUIC)
  • Comprehensive error diagnostics and troubleshooting
  • WebRTC leak testing (browser automation required)
  • HTML report generation
  • Configuration file support (YAML)
  • CI/CD integration
  • Docker support
  • Batch testing from file
  • Streaming service tests (Netflix, YouTube)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

⚠️ Disclaimer

This tool is for educational and authorized testing purposes only. Users are responsible for ensuring they have permission to test any proxy/VPN services. The authors are not responsible for misuse of this tool.

πŸ™ Acknowledgments

  • Inspired by various VPN testing tools
  • Built with Go and modern security practices
  • Community feedback and contributions

Made with ❀️ for the privacy community

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages