Skip to content

imhiendev/GetTempMailORG

Repository files navigation

TempMail với JA3 Fingerprinting / TempMail with JA3 Fingerprinting

Tiếng Việt | English


Tiếng Việt

Thư viện C# mạnh mẽ để tạo địa chỉ email tạm thời sử dụng công nghệ JA3 fingerprinting tiên tiến để vượt qua bảo vệ Cloudflare và các biện pháp chống bot khác.

🚀 Tính Năng

  • JA3 Fingerprinting: Công nghệ TLS fingerprinting tiên tiến để mô phỏng trình duyệt thật
  • Nhiều JA3 Profile: Fingerprint Chrome tùy chỉnh và mặc định để tương thích tối đa
  • Vượt Qua Cloudflare: Thành công trong việc vượt qua bảo vệ Cloudflare
  • Hỗ Trợ Proxy: Hỗ trợ HTTP/HTTPS proxy với xác thực
  • Ép Buộc HTTP/1.1: Ngăn chặn vấn đề phản hồi binary HTTP/2
  • Hỗ Trợ Chunked Encoding: Xử lý HTTP chunked transfer encoding
  • Hỗ Trợ Nén: Tự động giải nén Gzip/Deflate
  • Theo Dõi OTP: Theo dõi thời gian thực email và OTP đến
  • Khả Năng Chịu Lỗi: Nhiều cơ chế dự phòng để đảm bảo độ tin cậy tối đa

📋 Yêu Cầu

  • .NET 8.0 trở lên
  • Kết nối Internet
  • Tương thích Windows/Linux/macOS
  • Proxy server (tùy chọn)

🛠️ Cài Đặt

  1. Clone repository:
git clone <repository-url>
cd GetTempMailORG
  1. Build dự án:
dotnet build
  1. Chạy ứng dụng:
dotnet run

💻 Cách Sử Dụng

Sử Dụng Cơ Bản

using GetTempMailORG;

// Tạo instance TempMail
using var tempMail = new TempMail();

// Lấy email tạm thời
var mail = await tempMail.GetMailAsync();
if (mail != null)
{
    Console.WriteLine($"Email: {mail.Email}");
    Console.WriteLine($"Token: {mail.Token}");
    
    // Theo dõi OTP
    var otp = await tempMail.GetOTPAsync(mail.Token);
    if (!string.IsNullOrEmpty(otp))
    {
        Console.WriteLine($"OTP: {otp}");
    }
}

Sử Dụng Với Proxy

using GetTempMailORG;

// Proxy không có xác thực
using var tempMail = new TempMail("192.168.1.100:8080");

// Proxy có xác thực
using var tempMailAuth = new TempMail("192.168.1.100:8080:username:password");

var mail = await tempMail.GetMailAsync();

Sử Dụng Đồng Bộ

using var tempMail = new TempMail();

var mail = tempMail.GetMail();
if (mail != null)
{
    var otp = tempMail.GetOTP(mail.Token);
}

🌐 Cấu Hình Proxy

Các Định Dạng Proxy Được Hỗ Trợ

  1. Proxy cơ bản: ip:port

    var tempMail = new TempMail("192.168.1.100:8080");
  2. Proxy có xác thực: ip:port:username:password

    var tempMail = new TempMail("192.168.1.100:8080:myuser:mypass");

Ví Dụ Proxy

// Proxy HTTP cơ bản
using var tempMail1 = new TempMail("proxy.example.com:3128");

// Proxy với username/password
using var tempMail2 = new TempMail("secure-proxy.com:8080:john:secret123");

// Proxy local SOCKS (qua HTTP tunnel)
using var tempMail3 = new TempMail("127.0.0.1:1080");

var mail = await tempMail1.GetMailAsync();

Lưu Ý Proxy

  • HTTP/HTTPS proxy: Được hỗ trợ đầy đủ
  • Proxy authentication: Basic auth được hỗ trợ
  • Connection pooling: Tự động quản lý kết nối
  • ⚠️ SOCKS proxy: Cần HTTP tunnel wrapper
  • Proxy chains: Chưa được hỗ trợ

🏗️ Kiến Trúc

Các Thành Phần Chính

  1. TempMail: Class chính cho các thao tác email
  2. CustomHttpClient: HTTP client với JA3 fingerprinting và proxy support
  3. TlsClient: TLS client mức thấp với fingerprinting tùy chỉnh và proxy tunneling
  4. JA3Fingerprint: Định nghĩa và tiện ích JA3 fingerprint

Luồng Request Với Proxy

TempMail → CustomHttpClient → TlsClient → Proxy Server → Target Server
    ↑            ↑               ↑             ↑              ↑
JA3 Config   HTTP/1.1      TLS Handshake   CONNECT      Final Request
             Headers       với JA3         Tunnel       với JA3

Luồng Request Trực Tiếp

TempMail → CustomHttpClient → TlsClient → Target Server
    ↑            ↑               ↑              ↑
JA3 Config   HTTP/1.1      TLS Handshake   Final Request
             Headers       với JA3         với JA3

🔧 Chi Tiết Kỹ Thuật

JA3 Fingerprinting

JA3 là phương pháp tạo fingerprint cho SSL/TLS client. Thư viện triển khai:

  • TLS handshake tùy chỉnh với cipher suite cụ thể
  • Thứ tự extension được kiểm soát
  • Thương lượng application protocol (chỉ HTTP/1.1)
  • Bỏ qua xác thực certificate

Proxy Implementation

  • HTTP CONNECT tunneling: Sử dụng method CONNECT để tạo tunnel
  • Basic Authentication: Hỗ trợ username/password authentication
  • Connection reuse: Tối ưu hóa hiệu suất với connection pooling
  • Error handling: Xử lý lỗi proxy một cách graceful

Tính Năng Chống Phát Hiện

  • Browser Headers: Header Chrome thực tế
  • Ép Buộc HTTP/1.1: Ngăn phát hiện HTTP/2
  • Quản Lý Kết Nối: Xử lý kết nối đúng cách qua proxy
  • Mô Phỏng Lỗi: Mẫu lỗi giống con người

Xử Lý Response

  • Chunked Encoding: Xử lý chunk tự động
  • Compression: Giải nén Gzip/Deflate
  • Phát Hiện Encoding: Hỗ trợ nhiều character encoding
  • Khôi Phục Lỗi: Cơ chế fallback mềm mại

🎯 Trường Hợp Sử Dụng

  • Testing: Kiểm thử xác minh email qua proxy
  • Development: Email tạm thời cho phát triển với proxy corp
  • Privacy: Giao tiếp email ẩn danh qua proxy
  • Automation: Xử lý email tự động trong môi trường proxy
  • Bypass Geo-blocking: Sử dụng proxy để vượt qua giới hạn địa lý

🔒 Bảo Mật & Pháp Lý

Sử Dụng Đạo Đức

Công cụ này được thiết kế cho:

  • ✅ Kiểm thử ứng dụng của bạn
  • ✅ Phát triển và debug
  • ✅ Mục đích giáo dục
  • ✅ Nhu cầu email tạm thời hợp pháp
  • ✅ Bảo vệ privacy qua proxy hợp pháp

Không Dành Cho

  • ❌ Vượt qua biện pháp bảo mật hợp pháp
  • ❌ Spam hoặc lạm dụng
  • ❌ Hoạt động bất hợp pháp
  • ❌ Vi phạm điều khoản dịch vụ
  • ❌ Sử dụng proxy trái phép

Tuyên Bố Miễn Trừ

Người dùng có trách nhiệm tuân thủ luật pháp hiện hành và điều khoản dịch vụ. Việc sử dụng proxy phải tuân thủ quy định pháp lý và chính sách của proxy provider.

🚨 Rate Limiting & Best Practices

Thực Hành Được Khuyến Nghị

  1. Delays: Thêm delay phù hợp giữa các request
  2. Retry Logic: Triển khai exponential backoff
  3. Error Handling: Xử lý lỗi một cách graceful
  4. Resource Cleanup: Luôn dispose resources
  5. Proxy Rotation: Sử dụng nhiều proxy để tránh rate limit

Ví Dụ Với Rate Limiting

using var tempMail = new TempMail("proxy1.example.com:8080");

// Thêm delay giữa các request
await Task.Delay(2000);

var mail = await tempMail.GetMailAsync();
if (mail != null)
{
    // Chờ trước khi check OTP
    await Task.Delay(5000);
    var otp = await tempMail.GetOTPAsync(mail.Token);
}

Proxy Best Practices

// Sử dụng multiple proxy để load balancing
var proxies = new[]
{
    "proxy1.example.com:8080:user1:pass1",
    "proxy2.example.com:8080:user2:pass2",
    "proxy3.example.com:8080:user3:pass3"
};

foreach (var proxy in proxies)
{
    try
    {
        using var tempMail = new TempMail(proxy);
        var mail = await tempMail.GetMailAsync();
        if (mail != null)
        {
            // Success with this proxy
            break;
        }
    }
    catch
    {
        // Try next proxy
        continue;
    }
}

🐛 Khắc Phục Sự Cố

Các Vấn Đề Thường Gặp

  1. Connection Timeout

    • Kiểm tra kết nối internet và proxy
    • Tăng giá trị timeout
    • Thử JA3 profile khác
    • Kiểm tra proxy authentication
  2. Proxy Connection Failed

    • Xác minh proxy server đang hoạt động
    • Kiểm tra credentials proxy
    • Thử proxy khác
    • Kiểm tra firewall settings
  3. Invalid Response

    • Server có thể đã cập nhật bảo vệ
    • Thử chạy lại sau một khoảng thời gian
    • Kiểm tra xem dịch vụ có khả dụng không
    • Thử proxy từ location khác
  4. Không Nhận Được OTP

    • Email có thể mất thời gian để đến
    • Kiểm tra thư mục spam tương ứng
    • Xác minh địa chỉ email đúng
    • Thử refresh email nhiều lần

Debug Proxy Issues

try
{
    using var tempMail = new TempMail("proxy.example.com:8080:user:pass");
    var mail = await tempMail.GetMailAsync();
}
catch (Exception ex)
{
    Console.WriteLine($"Proxy error: {ex.Message}");
    
    // Try without proxy
    using var directTempMail = new TempMail();
    var mail = await directTempMail.GetMailAsync();
}

📊 Hiệu Suất

Benchmark

  • Tạo Email: ~2-5 giây (trực tiếp), ~3-8 giây (qua proxy)
  • Nhận OTP: ~1-2 phút (tùy thuộc vào email đến)
  • Sử Dụng Memory: ~10-20 MB
  • Tỷ Lệ Thành Công: ~95% (trực tiếp), ~85% (qua proxy)
  • Proxy Overhead: ~30-50% tăng latency

Mẹo Tối Ưu

  1. Tái sử dụng TempMail instance khi có thể
  2. Sử dụng proxy gần về địa lý
  3. Triển khai connection pooling cho nhiều request
  4. Sử dụng async methods để hiệu suất tốt hơn
  5. Cache các fingerprint thành công
  6. Monitor proxy performance và switch khi cần

🔄 Tài Liệu API

Class TempMail

Constructors

  • TempMail(): Tạo instance không proxy
  • TempMail(string proxyString): Tạo instance với proxy

Methods

  • GetMailAsync(): Lấy email tạm thời bất đồng bộ
  • GetMail(): Lấy email tạm thời đồng bộ
  • GetOTPAsync(string token): Theo dõi OTP bất đồng bộ
  • GetOTP(string token): Lấy OTP đồng bộ
  • Dispose(): Dọn dẹp tài nguyên

Properties

  • Mail.Email: Địa chỉ email tạm thời
  • Mail.Token: Token xác thực cho email

Class JA3Fingerprint

Static Properties

  • Default: Fingerprint Chrome tiêu chuẩn
  • CustomChrome: Fingerprint Chrome nâng cao

Methods

  • ParseFromString(string ja3): Parse JA3 từ string
  • GenerateJA3String(): Tạo JA3 string
  • GetDisplayInfo(): Lấy thông tin fingerprint

🤝 Đóng Góp

  1. Fork repository
  2. Tạo feature branch
  3. Thực hiện thay đổi
  4. Thêm test nếu có thể
  5. Submit pull request

Thiết Lập Development

git clone <repository-url>
cd GetTempMailORG
dotnet restore
dotnet build

Testing

dotnet test

📝 Giấy Phép

Dự án này được cung cấp cho mục đích giáo dục và kiểm thử hợp pháp. Người dùng có trách nhiệm đảm bảo tuân thủ luật pháp hiện hành và điều khoản dịch vụ.

🙏 Ghi Nhận

  • Phương pháp JA3 fingerprinting bởi Salesforce
  • Hướng dẫn triển khai TLS từ tài liệu .NET
  • Đặc tả giao thức HTTP từ tài liệu RFC
  • HTTP CONNECT proxy specification

📞 Hỗ Trợ

Đối với các vấn đề và câu hỏi:

  1. Kiểm tra phần khắc phục sự cố
  2. Xem lại các vấn đề thường gặp
  3. Test với và không có proxy
  4. Tạo issue với thông tin chi tiết

English

A powerful C# library for creating temporary email addresses using advanced JA3 fingerprinting to bypass Cloudflare protection and other anti-bot measures.

🚀 Features

  • JA3 Fingerprinting: Advanced TLS fingerprinting to mimic real browsers
  • Multiple JA3 Profiles: Custom Chrome and Default fingerprints for maximum compatibility
  • Cloudflare Bypass: Successfully bypasses Cloudflare protection
  • Proxy Support: HTTP/HTTPS proxy support with authentication
  • HTTP/1.1 Enforcement: Prevents HTTP/2 binary response issues
  • Chunked Encoding Support: Handles HTTP chunked transfer encoding
  • Compression Support: Automatic Gzip/Deflate decompression
  • OTP Monitoring: Real-time monitoring for incoming emails and OTPs
  • Error Resilience: Multiple fallback mechanisms for maximum reliability

📋 Requirements

  • .NET 8.0 or higher
  • Internet connection
  • Windows/Linux/macOS compatible
  • Proxy server (optional)

🛠️ Installation

  1. Clone the repository:
git clone <repository-url>
cd GetTempMailORG
  1. Build the project:
dotnet build
  1. Run the application:
dotnet run

💻 Usage

Basic Usage

using GetTempMailORG;

// Create TempMail instance
using var tempMail = new TempMail();

// Get temporary email
var mail = await tempMail.GetMailAsync();
if (mail != null)
{
    Console.WriteLine($"Email: {mail.Email}");
    Console.WriteLine($"Token: {mail.Token}");
    
    // Monitor for OTP
    var otp = await tempMail.GetOTPAsync(mail.Token);
    if (!string.IsNullOrEmpty(otp))
    {
        Console.WriteLine($"OTP: {otp}");
    }
}

Usage with Proxy

using GetTempMailORG;

// Proxy without authentication
using var tempMail = new TempMail("192.168.1.100:8080");

// Proxy with authentication
using var tempMailAuth = new TempMail("192.168.1.100:8080:username:password");

var mail = await tempMail.GetMailAsync();

Synchronous Usage

using var tempMail = new TempMail();

var mail = tempMail.GetMail();
if (mail != null)
{
    var otp = tempMail.GetOTP(mail.Token);
}

🌐 Proxy Configuration

Supported Proxy Formats

  1. Basic proxy: ip:port

    var tempMail = new TempMail("192.168.1.100:8080");
  2. Authenticated proxy: ip:port:username:password

    var tempMail = new TempMail("192.168.1.100:8080:myuser:mypass");

Proxy Examples

// Basic HTTP proxy
using var tempMail1 = new TempMail("proxy.example.com:3128");

// Proxy with username/password
using var tempMail2 = new TempMail("secure-proxy.com:8080:john:secret123");

// Local SOCKS proxy (via HTTP tunnel)
using var tempMail3 = new TempMail("127.0.0.1:1080");

var mail = await tempMail1.GetMailAsync();

Proxy Notes

  • HTTP/HTTPS proxy: Fully supported
  • Proxy authentication: Basic auth supported
  • Connection pooling: Automatic connection management
  • ⚠️ SOCKS proxy: Requires HTTP tunnel wrapper
  • Proxy chains: Not yet supported

🏗️ Architecture

Core Components

  1. TempMail: Main class for email operations
  2. CustomHttpClient: HTTP client with JA3 fingerprinting and proxy support
  3. TlsClient: Low-level TLS client with custom fingerprinting and proxy tunneling
  4. JA3Fingerprint: JA3 fingerprint definitions and utilities

Request Flow with Proxy

TempMail → CustomHttpClient → TlsClient → Proxy Server → Target Server
    ↑            ↑               ↑             ↑              ↑
JA3 Config   HTTP/1.1      TLS Handshake   CONNECT      Final Request
             Headers       with JA3         Tunnel       with JA3

Direct Request Flow

TempMail → CustomHttpClient → TlsClient → Target Server
    ↑            ↑               ↑              ↑
JA3 Config   HTTP/1.1      TLS Handshake   Final Request
             Headers       with JA3         with JA3

🔧 Technical Details

JA3 Fingerprinting

JA3 is a method for creating SSL/TLS client fingerprints. The library implements:

  • Custom TLS handshake with specific cipher suites
  • Controlled extension ordering
  • Application protocol negotiation (HTTP/1.1 only)
  • Certificate validation bypass

Proxy Implementation

  • HTTP CONNECT tunneling: Uses CONNECT method to create tunnel
  • Basic Authentication: Supports username/password authentication
  • Connection reuse: Performance optimization with connection pooling
  • Error handling: Graceful proxy error handling

Anti-Detection Features

  • Browser Headers: Realistic Chrome headers
  • HTTP/1.1 Enforcement: Prevents HTTP/2 detection
  • Connection Management: Proper connection handling through proxy
  • Error Simulation: Human-like error patterns

Response Handling

  • Chunked Encoding: Automatic chunk processing
  • Compression: Gzip/Deflate decompression
  • Encoding Detection: Multiple character encoding support
  • Error Recovery: Graceful fallback mechanisms

🎯 Use Cases

  • Testing: Email verification testing through proxy
  • Development: Temporary email for development with corporate proxy
  • Privacy: Anonymous email communication through proxy
  • Automation: Automated email handling in proxy environments
  • Bypass Geo-blocking: Use proxy to bypass geographical restrictions

🔒 Security & Legal

Ethical Usage

This tool is designed for:

  • ✅ Testing your own applications
  • ✅ Development and debugging
  • ✅ Educational purposes
  • ✅ Legitimate temporary email needs
  • ✅ Privacy protection through legal proxy usage

Not Intended For

  • ❌ Bypassing legitimate security measures
  • ❌ Spamming or abuse
  • ❌ Illegal activities
  • ❌ Violating terms of service
  • ❌ Unauthorized proxy usage

Disclaimer

Users are responsible for complying with applicable laws and terms of service. Proxy usage must comply with legal regulations and proxy provider policies.

🚨 Rate Limiting & Best Practices

Thực Hành Được Khuyến Nghị

  1. Delays: Thêm delay phù hợp giữa các request
  2. Retry Logic: Triển khai exponential backoff
  3. Error Handling: Xử lý lỗi một cách graceful
  4. Resource Cleanup: Luôn dispose resources
  5. Proxy Rotation: Sử dụng nhiều proxy để tránh rate limit

Ví Dụ Với Rate Limiting

using var tempMail = new TempMail("proxy1.example.com:8080");

// Thêm delay giữa các request
await Task.Delay(2000);

var mail = await tempMail.GetMailAsync();
if (mail != null)
{
    // Chờ trước khi check OTP
    await Task.Delay(5000);
    var otp = await tempMail.GetOTPAsync(mail.Token);
}

Proxy Best Practices

// Sử dụng multiple proxy để load balancing
var proxies = new[]
{
    "proxy1.example.com:8080:user1:pass1",
    "proxy2.example.com:8080:user2:pass2",
    "proxy3.example.com:8080:user3:pass3"
};

foreach (var proxy in proxies)
{
    try
    {
        using var tempMail = new TempMail(proxy);
        var mail = await tempMail.GetMailAsync();
        if (mail != null)
        {
            // Success with this proxy
            break;
        }
    }
    catch
    {
        // Try next proxy
        continue;
    }
}

🐛 Khắc Phục Sự Cố

Các Vấn Đề Thường Gặp

  1. Connection Timeout

    • Kiểm tra kết nối internet và proxy
    • Tăng giá trị timeout
    • Thử JA3 profile khác
    • Kiểm tra proxy authentication
  2. Proxy Connection Failed

    • Xác minh proxy server đang hoạt động
    • Kiểm tra credentials proxy
    • Thử proxy khác
    • Kiểm tra firewall settings
  3. Invalid Response

    • Server có thể đã cập nhật bảo vệ
    • Thử chạy lại sau một khoảng thời gian
    • Kiểm tra xem dịch vụ có khả dụng không
    • Thử proxy từ location khác
  4. Không Nhận Được OTP

    • Email có thể mất thời gian để đến
    • Kiểm tra thư mục spam tương ứng
    • Xác minh địa chỉ email đúng
    • Thử refresh email nhiều lần

Debug Proxy Issues

try
{
    using var tempMail = new TempMail("proxy.example.com:8080:user:pass");
    var mail = await tempMail.GetMailAsync();
}
catch (Exception ex)
{
    Console.WriteLine($"Proxy error: {ex.Message}");
    
    // Try without proxy
    using var directTempMail = new TempMail();
    var mail = await directTempMail.GetMailAsync();
}

📊 Hiệu Suất

Benchmark

  • Tạo Email: ~2-5 giây (trực tiếp), ~3-8 giây (qua proxy)
  • Nhận OTP: ~1-2 phút (tùy thuộc vào email đến)
  • Sử Dụng Memory: ~10-20 MB
  • Tỷ Lệ Thành Công: ~95% (trực tiếp), ~85% (qua proxy)
  • Proxy Overhead: ~30-50% tăng latency

Mẹo Tối Ưu

  1. Tái sử dụng TempMail instance khi có thể
  2. Sử dụng proxy gần về địa lý
  3. Triển khai connection pooling cho nhiều request
  4. Sử dụng async methods để hiệu suất tốt hơn
  5. Cache các fingerprint thành công
  6. Monitor proxy performance và switch khi cần

🔄 Tài Liệu API

Class TempMail

Constructors

  • TempMail(): Tạo instance không proxy
  • TempMail(string proxyString): Tạo instance với proxy

Methods

  • GetMailAsync(): Lấy email tạm thời bất đồng bộ
  • GetMail(): Lấy email tạm thời đồng bộ
  • GetOTPAsync(string token): Theo dõi OTP bất đồng bộ
  • GetOTP(string token): Lấy OTP đồng bộ
  • Dispose(): Dọn dẹp tài nguyên

Properties

  • Mail.Email: Địa chỉ email tạm thời
  • Mail.Token: Token xác thực cho email

Class JA3Fingerprint

Static Properties

  • Default: Fingerprint Chrome tiêu chuẩn
  • CustomChrome: Fingerprint Chrome nâng cao

Methods

  • ParseFromString(string ja3): Parse JA3 từ string
  • GenerateJA3String(): Tạo JA3 string
  • GetDisplayInfo(): Lấy thông tin fingerprint

🤝 Đóng Góp

  1. Fork repository
  2. Tạo feature branch
  3. Thực hiện thay đổi
  4. Thêm test nếu có thể
  5. Submit pull request

Thiết Lập Development

git clone <repository-url>
cd GetTempMailORG
dotnet restore
dotnet build

Testing

dotnet test

📝 Giấy Phép

Dự án này được cung cấp cho mục đích giáo dục và kiểm thử hợp pháp. Người dùng có trách nhiệm đảm bảo tuân thủ luật pháp hiện hành và điều khoản dịch vụ.

🙏 Ghi Nhận

  • Phương pháp JA3 fingerprinting bởi Salesforce
  • Hướng dẫn triển khai TLS từ tài liệu .NET
  • Đặc tả giao thức HTTP từ tài liệu RFC
  • HTTP CONNECT proxy specification

📞 Hỗ Trợ

Đối với các vấn đề và câu hỏi:

  1. Kiểm tra phần khắc phục sự cố
  2. Xem lại các vấn đề thường gặp
  3. Test với và không có proxy
  4. Tạo issue với thông tin chi tiết

⚠️ Quan Trọng / Important: Công cụ này nên được sử dụng có trách nhiệm và tuân thủ luật pháp hiện hành cũng như điều khoản dịch vụ. / This tool should be used responsibly and in accordance with applicable laws and terms of service. Các nhà phát triển không chịu trách nhiệm cho việc sử dụng sai mục đích phần mềm này. / The developers are not responsible for misuse of this software.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages