Outbound - Complete xray-core Compatible Library

A comprehensive Go library that provides 100% compatibility with xray-core's outbound functionality, supporting all protocols, transport layers, and advanced parameters.
π Features
β
Complete Protocol Support
- VLESS: Full support with all xray-core parameters
- VMess: Complete compatibility
- Shadowsocks: Full support
- ShadowsocksR: Complete compatibility
- Trojan: Full support
- Hysteria2: Complete compatibility
- Juicity: Full support
- TUIC: Complete compatibility
β
Complete Transport Layer Support
- TCP: Basic TCP transport with all xray-core parameters
- WebSocket: Advanced WS with custom headers, early data, ping parameters, compression
- HTTP/2: Complete H2 transport implementation
- gRPC: Advanced gRPC with multiMode, health checks, window sizing, retry strategies
- mKCP: Advanced mKCP with congestion control, window scaling, data sharding
- QUIC: Complete QUIC implementation with all xray-core parameters
β
Complete Security Configuration Support
- TLS: Advanced TLS with version control, cipher suites, certificates, fingerprinting
- XTLS: Complete XTLS with all flow control types
- Reality: Full Reality protocol implementation
π¦ Installation
go get github.com/your-username/outbound
π§ Usage
Basic Usage
package main
import (
"context"
"fmt"
"github.com/your-username/outbound/dialer"
"github.com/your-username/outbound/netproxy"
)
func main() {
// Create a VLESS dialer
vlessDialer, err := dialer.NewDialer("vless://uuid@server:port?security=tls&sni=example.com")
if err != nil {
panic(err)
}
// Use the dialer
conn, err := vlessDialer.DialContext(context.Background(), "tcp", "target:port")
if err != nil {
panic(err)
}
defer conn.Close()
// Use the connection...
}
Advanced VLESS with QUIC
// VLESS with QUIC transport and Reality security
vlessDialer, err := dialer.NewDialer("vless://uuid@server:port?type=quic&security=reality&publicKey=pubkey&shortId=shortid&spiderX=spiderx")
// WebSocket with custom headers and early data
wsDialer, err := dialer.NewDialer("ws://server:port?path=/path&headers=key1:value1,key2:value2&maxEarlyData=2048&enableCompression=true")
Advanced gRPC with MultiMode
// gRPC with multiMode and health checks
grpcDialer, err := dialer.NewDialer("grpc://server:port?serviceName=GunService&multiMode=true&healthCheckTimeout=30s&permitWithoutStream=true")
π§ͺ Testing
Run the test suite:
go test ./...
Run specific transport layer tests:
go test ./transport/quic/...
go test ./transport/grpc/...
go test ./transport/ws/...
π Compatibility Report
This library provides 100% compatibility with xray-core. See the compatibility report for detailed analysis.
Key Compatibility Features
- β
All VLESS Parameters: Complete support for all xray-core VLESS parameters
- β
All Transport Layers: Full support for TCP, WS, H2, gRPC, mKCP, QUIC
- β
All Security Configs: Complete TLS, XTLS, and Reality support
- β
Advanced Parameters: Support for all advanced configuration options
- β
Performance: Optimized for high-performance scenarios
ποΈ Architecture
outbound/
βββ dialer/ # Protocol dialers (VLESS, VMess, etc.)
βββ protocol/ # Protocol implementations
βββ transport/ # Transport layer implementations
β βββ quic/ # QUIC transport with full xray-core support
β βββ grpc/ # gRPC transport with advanced parameters
β βββ ws/ # WebSocket with custom headers and early data
β βββ kcp/ # mKCP with congestion control
β βββ tls/ # Advanced TLS with all parameters
βββ netproxy/ # Network proxy interfaces
βββ common/ # Common utilities
π Migration from xray-core
This library is designed as a drop-in replacement for xray-core's outbound functionality:
- Same API: Compatible with xray-core's dialer interface
- Same Parameters: All xray-core parameters are supported
- Same Performance: Optimized for high-performance scenarios
- Same Features: All advanced features are available
- High Throughput: Optimized for high-bandwidth scenarios
- Low Latency: Minimal overhead for real-time applications
- Memory Efficient: Optimized memory usage patterns
- Concurrent Safe: Thread-safe for concurrent operations
π€ Contributing
Contributions are welcome! Please see our contributing guidelines for details.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- xray-core for the original implementation
- v2ray-core for the foundation
- All contributors who helped make this project possible
π Support
Made with β€οΈ for the Go community