### RuleObject Configuration Example Source: https://www.v2fly.org/config/routing.html A comprehensive example of a RuleObject demonstrating various matching criteria including domains, IP ranges, ports, and custom attributes. ```json { "domainMatcher": "mph", "type": "field", "domains": [ "baidu.com", "qq.com", "geosite:cn", "ext:customizedGeoSiteFile.dat:cn" ], "ip": [ "0.0.0.0/8", "10.0.0.0/8", "fc00::/7", "fe80::/10", "geoip:cn", "geoip:!cn", "ext:customizedGeoIPFile.dat:cn", "ext:customizedGeoIPFile.dat:!cn", "ext-ip:customizedGeoIPFile.dat:cn", "ext-ip:customizedGeoIPFile.dat:!cn" ], "port": "53,443,1000-2000", "sourcePort": "53,443,1000-2000", "network": "tcp", "source": [ "10.0.0.1" ], "user": [ "love@v2ray.com" ], "inboundTag": [ "tag-vmess" ], "protocol": [ "http", "tls", "bittorrent" ], "attrs": "attrs[':method'] == 'GET'", "outboundTag": "direct", "balancerTag": "balancer" } ``` -------------------------------- ### Transparent Proxy Configuration Source: https://www.v2fly.org/config/protocols/dokodemo.html Example configuration for enabling transparent proxying with Dokodemo-door. ```json { "network": "tcp,udp", "timeout": 30, "followRedirect": true } ``` -------------------------------- ### Configure DNS Object Source: https://www.v2fly.org/config/dns.html Example of a complete DNS configuration object including hosts, server definitions, and global settings. ```json { "hosts": { "baidu.com": "127.0.0.1", "example.com": [ "127.0.0.1", "::1", "proxy.example.com", "127.0.0.2" ], "dns.google": "8.8.8.8", "proxy.example.com": "127.0.0.1", "geosite:test": [ "another-proxy.example.com", "127.0.0.1" ], "geosite:category-ads-all": [ "127.0.0.1", "127.0.0.2", "::1" ] }, "servers": [ "https://dns.google/dns-query", { "address": "223.5.5.5", "port": 5353, "clientIp": "5.6.7.8", "skipFallback": true, "domains": [ "domain:baidu.com", "geosite:cn" ], "expectIPs": [ "geoip:cn", "ext:customizedGeoIPFile.dat:cn", "ext-ip:customizedGeoIPFile.dat:cn" ] }, { "address": "fakedns", "domains": [ "domain:v2fly.org", "geosite:geolocation-!cn" ] }, { "address": "https://1.1.1.1/dns-query", "domains": [ "domain:v2fly.org", "geosite:geolocation-!cn" ], "expectIPs": [ "geoip:!cn", "ext:customizedGeoIPFile.dat:!cn", "ext-ip:customizedGeoIPFile.dat:!cn" ] }, "1.0.0.1", "localhost" ], "clientIp": "1.2.3.4", "queryStrategy": "UseIPv4", "disableCache": true, "disableFallback": true, "tag": "dns_inbound" } ``` -------------------------------- ### ServerObject Configuration Example Source: https://www.v2fly.org/config/dns.html A JSON object representing a DNS server configuration with address, port, client IP, fallback settings, and domain/IP filters. ```json { "address": "223.5.5.5", "port": 5353, "clientIp": "5.6.7.8", "skipFallback": true, "domains": [ "domain:baidu.com", "geosite:cn" ], "expectIPs": [ "geoip:cn", "ext:customizedGeoIPFile.dat:cn", "ext-ip:customizedGeoIPFile.dat:cn" ] } ``` -------------------------------- ### Define a CertificateObject Source: https://www.v2fly.org/config/transport.html A complete example of a CertificateObject configuration using both certificate and key arrays. ```json { "usage": "encipherment", "certificateFile": "/path/to/certificate.crt", "keyFile": "/path/to/key.key", "certificate": [ "-----BEGIN CERTIFICATE-----", "MIICwDCCAaigAwIBAgIRAO16JMdESAuHidFYJAR/7kAwDQYJKoZIhvcNAQELBQAw", "ADAeFw0xODA0MTAxMzU1MTdaFw0xODA0MTAxNTU1MTdaMAAwggEiMA0GCSqGSIb3", "DQEBAQUAA4IBDwAwggEKAoIBAQCs2PX0fFSCjOemmdm9UbOvcLctF94Ox4BpSfJ+", "3lJHwZbvnOFuo56WhQJWrclKoImp/c9veL1J4Bbtam3sW3APkZVEK9UxRQ57HQuw", "OzhV0FD20/0YELou85TwnkTw5l9GVCXT02NG+pGlYsFrxesUHpojdl8tIcn113M5", "pypgDPVmPeeORRf7nseMC6GhvXYM4txJPyenohwegl8DZ6OE5FkSVR5wFQtAhbON", "OAkIVVmw002K2J6pitPuJGOka9PxcCVWhko/W+JCGapcC7O74palwBUuXE1iH+Jp", "noPjGp4qE2ognW3WH/sgQ+rvo20eXb9Um1steaYY8xlxgBsXAgMBAAGjNTAzMA4G", "A1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHSMBAf8EAjAA", "MA0GCSqGSIb3DQEBCwUAA4IBAQBUd9sGKYemzwPnxtw/vzkV8Q32NILEMlPVqeJU", "7UxVgIODBV6A1b3tOUoktuhmgSSaQxjhYbFAVTD+LUglMUCxNbj56luBRlLLQWo+", "9BUhC/ow393tLmqKcB59qNcwbZER6XT5POYwcaKM75QVqhCJVHJNb1zSEE7Co7iO", "6wIan3lFyjBfYlBEz5vyRWQNIwKfdh5cK1yAu13xGENwmtlSTHiwbjBLXfk+0A/8", "r/2s+sCYUkGZHhj8xY7bJ1zg0FRalP5LrqY+r6BckT1QPDIQKYy615j1LpOtwZe/", "d4q7MD/dkzRDsch7t2cIjM/PYeMuzh87admSyL6hdtK0Nm/Q", "-----END CERTIFICATE-----" ], "key": [ "-----BEGIN RSA PRIVATE KEY-----", "MIIEowIBAAKCAQEArNj19HxUgoznppnZvVGzr3C3LRfeDseAaUnyft5SR8GW75zh", "bqOeloUCVq3JSqCJqf3Pb3i9SeAW7Wpt7FtwD5GVRCvVMUUOex0LsDs4VdBQ9tP9", "GBC6LvOU8J5E8OZfRlQl09NjRvqRpWLBa8XrFB6aI3ZfLSHJ9ddzOacqYAz1Zj3n", "jkUX+57HjAuhob12DOLcST8np6IcHoJfA2ejhORZElUecBULQIWzjTgJCFVZsNNN", "itieqYrT7iRjpGvT8XAlVoZKP1viQhmqXAuzu+KWpcAVLlxNYh/iaZ6D4xqeKhNq", "IJ1t1h/7IEPq76NtHl2/VJtbLXmmGPMZcYAbFwIDAQABAoIBAFCgG4phfGIxK9Uw", "qrp+o9xQLYGhQnmOYb27OpwnRCYojSlT+mvLcqwvevnHsr9WxyA+PkZ3AYS2PLue", "C4xW0pzQgdn8wENtPOX8lHkuBocw1rNsCwDwvIguIuliSjI8o3CAy+xVDFgNhWap", "/CMzfQYziB7GlnrM6hH838iiy0dlv4I/HKk+3/YlSYQEvnFok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E KEY-----" ] } ``` -------------------------------- ### Starlark Attribute Script Examples Source: https://www.v2fly.org/config/routing.html Examples of Starlark scripts used in the 'attrs' field to inspect traffic properties for HTTP inbound proxies. ```python attrs[':method'] == 'GET' attrs[':path'].startswith('/test') attrs['accept'].index('text/html') >= 0 ``` -------------------------------- ### Golang Development Commands Source: https://www.v2fly.org/developer/intro/guide.html Essential commands for formatting, testing, and generating protocol buffers in the project root. ```bash go generate format.go ``` ```bash go test ./... ``` ```bash go generate proto.go ``` -------------------------------- ### 初始化多文件配置目录 Source: https://www.v2fly.org/config/multiple_config.html 使用循环命令快速创建推荐的多文件配置结构。 ```bash for BASE in 00_log 01_api 02_dns 03_routing 04_policy 05_inbounds 06_outbounds 07_transport 08_stats 09_reverse; do echo '{}' > "/etc/v2ray/$BASE.json"; done ``` ```bash for BASE in 00_log 01_api 02_dns 03_routing 04_policy 05_inbounds 06_outbounds 07_transport 08_stats 09_reverse; do echo '{}' > "/usr/local/etc/v2ray/$BASE.json"; done ``` -------------------------------- ### 交叉编译 Windows 版本 Source: https://www.v2fly.org/developer/intro/compile.html 通过设置 GOOS 和 GOARCH 环境变量,构建适用于 Windows 64 位系统的可执行文件。 ```bash CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $HOME/v2ray.exe -trimpath -ldflags "-s -w -buildid=" ./main CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $HOME/wv2ray.exe -trimpath -ldflags "-s -w -H windowsgui -buildid=" ./main ``` -------------------------------- ### 拉取源代码与依赖 Source: https://www.v2fly.org/developer/intro/compile.html 克隆 V2Ray 核心仓库并下载必要的 Go 模块依赖。 ```bash git clone https://github.com/v2fly/v2ray-core.git cd v2ray-core && go mod download ``` -------------------------------- ### 使用打包脚本构建 Source: https://www.v2fly.org/developer/intro/compile.html 下载并运行打包脚本以生成包含完整依赖的发布包。 ```bash wget https://raw.githubusercontent.com/v2fly/v2ray-core/master/release/user-package.sh chmod 755 user-package.sh ./user-package.sh ``` -------------------------------- ### 配置 Debian APT Pinning Source: https://www.v2fly.org/guide/install.html 通过 APT pinning 机制在 Debian Stable 系统中从 Unstable 仓库安装 V2Ray。 ```text Explanation: Uninstall or do not install any Debian-originated Explanation: package versions other than those in the stable distro Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin: release o=Debian Pin-Priority: -10 ``` ```text Package: v2ray Pin: release a=unstable Pin-Priority: 900 ``` ```bash # apt edit-sources unstable deb https://deb.debian.org/debian/ sid main deb-src https://deb.debian.org/debian/ sid main ``` ```bash # apt update # apt install v2ray ``` -------------------------------- ### Configure AllocateObject Source: https://www.v2fly.org/config/inbounds.html Settings for dynamic port allocation strategies, useful for randomizing port usage. ```json { "strategy": "always", "refresh": 5, "concurrency": 3 } ``` -------------------------------- ### V2Ray Command Line Usage Source: https://www.v2fly.org/guide/command.html Standard command line syntax for executing the V2Ray core process. ```bash v2ray [-version] [-test] [-config=config.json] [-format=json] ``` -------------------------------- ### 配置 GOPROXY Source: https://www.v2fly.org/developer/intro/compile.html 在无法访问 Google 的网络环境下,设置代理以确保依赖项能够正常下载。 ```bash go env -w GOPROXY=https://goproxy.io,direct ``` -------------------------------- ### 查看 V2Ray 运行日志 Source: https://www.v2fly.org/guide/faq.html 使用 systemd 管理 V2Ray 时,通过 journalctl 查看服务退出时的详细日志。 ```bash journalctl -u v2ray ``` -------------------------------- ### 配置 V2Ray 服务日志目录 Source: https://www.v2fly.org/guide/install.html 为使用 DynamicUser 的 V2Ray 服务配置日志目录权限。 ```bash # systemctl edit v2ray.service [Service] LogsDirectory=v2ray ``` -------------------------------- ### 多文件配置用法 Source: https://www.v2fly.org/config/multiple_config.html 通过命令行参数指定多个配置文件或配置目录。 ```bash v2ray -config base.json -config cf1.json -c cf2.json -c cf3.json ``` ```bash v2ray -confdir /etc/v2ray/confs ``` ```bash v2ray -c cf1.json -c cf2.json -confdir /etc/v2ray/confs ``` -------------------------------- ### 手动测试 V2Ray 配置文件 Source: https://www.v2fly.org/guide/faq.html 通过命令行手动运行 V2Ray 并指定配置文件进行测试,以捕获启动错误。 ```bash v2ray -config= -test ``` -------------------------------- ### 运行 V2Ray 命令 Source: https://www.v2fly.org/guide/start.html 用于查看帮助信息或启动 V2Ray 服务的命令行示例。 ```bash v2ray help ``` ```bash v2ray run -c /etc/v2ray/config.json ``` ```bash v2ray --config=/etc/v2ray/config.json ``` -------------------------------- ### Enable StatsObject in Configuration Source: https://www.v2fly.org/config/service/stats.html Include an empty StatsObject in the configuration file to enable the statistics module. ```json {} ``` -------------------------------- ### 通过包管理器安装 V2Ray Source: https://www.v2fly.org/guide/install.html 在 Windows、macOS 或 Linux 环境下使用包管理器快速安装。 ```bash scoop install v2ray ``` ```bash brew install v2ray ``` -------------------------------- ### 启动多文件配置示例 Source: https://www.v2fly.org/config/multiple_config.html 展示启动时依次读入多个配置文件的命令行输出信息。 ```bash $ v2ray -c v2ray.json -c 00_base.json -c 01_info.json -c 02_log.json -c outbound.json V2Ray v4.23.0-version (user) 20200311-000000 (go1.13.8 linux/mipsle) A unified platform for anti-censorship. 2020/03/22 18:40:00 [Info] v2ray.com/core/common/platform/ctlcmd: v2ctl> Read config: 00_base.json v2ctl> Read config: 01_info.json v2ctl> Read config: 02_log.json v2ctl> Read config: outbound.json v2ctl> [ outbound.json ] updated outbound with tag: proxy ``` -------------------------------- ### 配置文件目录结构 Source: https://www.v2fly.org/config/multiple_config.html 推荐的配置文件目录树状结构。 ```text . ├── 00_log.json ├── 01_api.json ├── 02_dns.json ├── 03_routing.json ├── 04_policy.json ├── 05_inbounds.json ├── 06_outbounds.json ├── 07_transport.json ├── 08_stats.json └── 09_reverse.json 0 directories, 10 files ``` -------------------------------- ### 手工构建 V2Ray Source: https://www.v2fly.org/developer/intro/compile.html 在项目根目录下编译生成当前系统的可执行文件。 ```bash CGO_ENABLED=0 go build -o $HOME/v2ray -trimpath -ldflags "-s -w -buildid=" ./main ``` -------------------------------- ### Configure StatsObject Source: https://www.v2fly.org/config/stats.html Enable statistics by including the stats object in the V2Ray configuration file. ```json { } ``` -------------------------------- ### 合并配置文件命令 Source: https://www.v2fly.org/config/multiple_config.html 通过命令行合并多个 JSON 配置文件。 ```bash v2ray -c base.json -c outbounds.json ``` ```bash v2ray -c base.json -c outbounds.json -c debuglog.json ``` -------------------------------- ### Project Directory Structure Source: https://www.v2fly.org/developer/intro/guide.html The standard directory layout for the v2ray-core repository. ```text v2ray-core ├── app // 应用模块 │ ├── router // 路由 ├── common // 公用代码 ├── proxy // 通讯协议 │ ├── blackhole │ ├── dokodemo-door │ ├── freedom │ ├── socks │ ├── vmess ├── transport // 传输模块 ``` -------------------------------- ### Server Object Source: https://www.v2fly.org/config/protocols/vless.html Represents a single server configuration within the vnext array. ```json { "address": "example.com", "port": 443, "users": [] } ``` -------------------------------- ### Server Object Source: https://www.v2fly.org/config/protocols/vmess.html Represents a single server configuration within the vnext array. ```json { "address": "127.0.0.1", "port": 37192, "users": [] } ``` -------------------------------- ### V2Ctl Fetch Command Source: https://www.v2fly.org/guide/command.html Retrieves content from a specified HTTP or HTTPS URL. ```bash v2ctl fetch ``` -------------------------------- ### 定制化打包参数 Source: https://www.v2fly.org/developer/intro/compile.html 通过传递参数定制发布包的操作系统、架构及包含内容。 ```bash ./user-package.sh windows 386 nodat noconf ``` -------------------------------- ### Set Global HTTP Proxy via Environment Variables Source: https://www.v2fly.org/config/protocols/http.html Configures the current Linux session to use a local HTTP proxy. ```bash export http_proxy=http://127.0.0.1:8080/ export https_proxy=$http_proxy ``` -------------------------------- ### Background Observatory Configuration Fields Source: https://www.v2fly.org/config/service/backgroundObservatory.html Configuration parameters for defining how the background observatory monitors outbound connections. ```json "subjectSelector": ["a"] "probeUrl": "https://example.com" "probeInterval": "10s" ``` -------------------------------- ### 验证 V2Ray 安装包 Source: https://www.v2fly.org/guide/install.html 使用命令行工具验证下载的 ZIP 压缩包完整性。 ```bash v2ray verify --sig=Release /path/to/your/downloaded/v2ray/zip/file ``` -------------------------------- ### Define SystemPolicyObject Configuration Source: https://www.v2fly.org/config/policy.html Global settings for enabling traffic statistics across all inbound and outbound proxies. ```json { "statsInboundUplink": false, "statsInboundDownlink": false, "statsOutboundUplink": false, "statsOutboundDownlink": false } ``` -------------------------------- ### OutboundConfigurationObject Source: https://www.v2fly.org/config/protocols/shadowsocks.html Configuration object for Shadowsocks outbound proxy settings. ```APIDOC ## OutboundConfigurationObject ### Parameters - **servers** (array) - Required - A list of ServerObject configurations. ### ServerObject - **email** (string) - Optional - Email address to identify the user. - **address** (string) - Required - Shadowsocks server address (IPv4, IPv6, or domain). - **port** (number) - Required - Shadowsocks server port. - **method** (string) - Required - Encryption method. - **password** (string) - Required - Password for the connection. - **level** (number) - Optional - User level. - **ivCheck** (boolean) - Optional - Enable IV check to mitigate replay attacks. ``` -------------------------------- ### VMess CmdKey 生成逻辑 Source: https://www.v2fly.org/developer/protocols/vmess.html 通过用户 UUID 派生 16 字节密钥,用于 AEAD 认证过程。 ```pseudocode CmdKey = MD5(UUID + []byte('c48619fe-8f02-49e0-b9e9-edf763e17e21')) ``` -------------------------------- ### V2Ctl Global Command Syntax Source: https://www.v2fly.org/guide/command.html General structure for invoking V2Ctl subcommands. ```bash v2ctl ``` -------------------------------- ### OutboundConfigurationObject Source: https://www.v2fly.org/config/protocols/vmess.html Configuration for VMess outbound connections, defining the server list and user authentication details. ```APIDOC ## OutboundConfigurationObject ### Description Defines the server settings for an outbound VMess connection. ### Structure - **vnext** (Array of ServerObject) - List of server configurations. ### ServerObject - **address** (string) - Server IP or domain. - **port** (number) - Server port. - **users** (Array of UserObject) - List of authorized users. ### UserObject - **id** (string) - UUID of the user. - **alterId** (number) - Number of additional IDs for anti-detection (default 0). - **security** (string) - Encryption method: "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero". - **level** (number) - User level. - **experiments** (string) - Experimental features (e.g., "AuthenticatedLength"). ``` -------------------------------- ### V2Ctl Config Conversion Source: https://www.v2fly.org/guide/command.html Converts JSON configuration from standard input to Protobuf format on standard output. ```bash v2ctl config ``` -------------------------------- ### StrategyObject Configuration Source: https://www.v2fly.org/config/routing.html Specifies the load balancing strategy, supporting types like random or leastPing. ```json { "type": "random" } ``` -------------------------------- ### Default Object Source: https://www.v2fly.org/config/protocols/vmess.html Provides default settings for clients when using dynamic ports. ```json { "level": 0, "alterId": 0 } ``` -------------------------------- ### 导入 PGP 公钥 Source: https://www.v2fly.org/guide/help.html 用于加密发送给安全团队的信息,包含开发者公钥及 Debian/Ubuntu 签名子钥。 ```text pub rsa4096 2020-06-02 [SC] [有效至:2022-01-02] E2E35E27914FB007C0D4B6DDB117BA3BE8B494A7 uid [ 绝对 ] V2Fly Developers sub rsa4096 2020-06-02 [E] [有效至:2022-01-02] sub rsa4096 2020-11-08 [S] [有效至:2022-01-02] // 用于 Debian / Ubuntu 签名 -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBF7V7pQBEACozcw4/BlPgFWaz4AdN8HKSrCDLlN+/g7m4AKZIo13fAnDh+sJ 2H4NrWNr0xxgovbco5Xw4OSSwY1BuUhnb4AmIyxbwqUQD2UADe5xD6gMBwNiJTP4 02VCHhh7DnWTeLbAsUgRotxUCxsWVvd2F08SYGfJggOVftOnG+VNnwzTOvHWFVEw 1Pv1DaY7bKSA0voACerRbAPCYqhmElAGJHYNjBMaxqCaWFJWpAFfBxkvS1FDVyZk BsABhn6sOcGJn8EYSHUIXhWwqtkQCjBB4OOik+Jn+S2DFGyk5l1NrGRQtX8C0BYn nc7VaxtFOp5fnJ4y0GNd4AM9KO0/Ojosi6b64l407Fj9i9OXznmZUACQw2u+VcL3 qNy768hsTmka3pXzpRHZwYcOLOEr3jGHmLOtXgQ656OjF8Xd9DJ4cB42X8iBeqTp iQchHIdBpnu27ZbBFy09OMak+STB5zA0JmxDaC8b48mVkc0BMRXdYl7wWXJsEJf1 roAOr3RCBKiE840w0PLOTnUljfqazPYTwzs91oP+SeZjBmGOpaAh7bh5BVOpzPSE bdA61/n01GEb5bpOKpaTi9GviF3RCbfFnLKJnBq0vHvW9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OHX9O/dGb3bb3y11LAf7GI28ZG7So1GeoFkEOga1IJnsBnXCqwM8vbDDWq /7aLb3/m0gT7DUfjeXKfWPJXcnaq8r4llHzDn2i6ax4Uq/brCOLj9ovVGIctZTbt yvsFOc1bVkSuUM+pMkCtBx80/sJSB2Nu94S6osdaUlRE+jaCcqEbPd+G68Yd0Khi CL8zF1a3dX1dpuVFTLNpXOgrviGBzXQmzFeil7mWFs0l+1XZOPz9nhmRrMn6wV3n i4KItRSJAXy5Ag0EX6d5hQEQAMsVyLTXdybeei2nWDb5jtzzC3AtSnPWtKG4B86C BXncaZpU43hKI3oduW2+42eM8n8KTvO11r9xv4zKATfaHBZq2hkKZdDQjuSstovr a3hapHHknHeNVTg3yuiakKzpr6FK23W/GE1lJfhz254v9+dRV0KazWksXvpGEdgI +6sC4Nr5bKgJVEQibyrrL0gmzlVB/oQU/W4eGvk21zmgMlHri+edBLpVtlCmn7k/ 0t+2X9D1Pq2nkjMUurB9EJ1z24LMldmPOl6P7iJCx9kSUjcHrEg56q5VSZq50FAj DeSjAqsdussI8cdstCMktE9nhizxVKFXpbXifqoYfJwCo23wFqQJpyPgQqHIT12s GWRUa/MF6hRYg/5CyeadDmkmnKPTPjmQ2S2SFNXX7xs+dZKvIvXP30z4cpuVY8i8 chZSRNb8K0L9T0Jme7CPm28F6lvDUkNDQ1WErXZruHbOKwQOfQBdXK3nedOiUpBt 401HVlGUJSInfEb3JXU01tRqnnzI/y5z7cWCGEMEa6TeaCrMbVvl8xeAA1w/nw0y zHz6/Pnf4TITuCH22aa7+xfgpq8gRLhUUws89mbQT+9fd8tT65+Q8xcaLCyzrLAq ``` -------------------------------- ### Configure DNS Splitting Source: https://www.v2fly.org/config/fakedns.html Uses domains to prioritize FakeDNS alongside other DNS servers for specific traffic. ```json { "servers": [ { "address": "fakedns", "domains": [ "geosite:cn" ] }, { "address": "223.5.5.5", "domains": [ "geosite:cn" ], "expectIPs": [ "geoip:cn" ] }, "8.8.8.8" ] } ``` -------------------------------- ### InboundConfigurationObject Source: https://www.v2fly.org/config/protocols/shadowsocks.html Configuration object for Shadowsocks inbound proxy settings. ```APIDOC ## InboundConfigurationObject ### Parameters - **email** (string) - Optional - Email address to identify the user. - **method** (string) - Required - Encryption method (e.g., "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "none"). - **password** (string) - Required - Password for the connection. - **level** (number) - Optional - User level, default is 0. - **network** (string) - Optional - Network types to accept: "tcp", "udp", or "tcp,udp". Default is "tcp". - **ivCheck** (boolean) - Optional - Enable IV check to mitigate replay attacks. Default is false. - **udp** (boolean) - Optional - Enable UDP support. Default is false. - **packetEncoding** (string) - Optional - UDP packet encoding: "None" or "Packet". Default is "None". ``` -------------------------------- ### Portal Routing Configuration Source: https://www.v2fly.org/config/reverse.html Routing rules for the portal to direct traffic to the reverse proxy. ```json "routing": { "rules": [ { "type": "field", "inboundTag": [ "external" ], "outboundTag": "portal" }, { "type": "field", "inboundTag": [ "interconn" ], "outboundTag": "portal" } ] } ``` -------------------------------- ### BridgeObject Configuration Source: https://www.v2fly.org/config/reverse.html Defines a bridge node that initiates connections to the portal. ```json { "tag": "bridge", "domain": "test.v2fly.org" } ``` -------------------------------- ### Configure MuxObject Source: https://www.v2fly.org/config/outbounds.html Settings for multiplexing multiple TCP connections over a single TCP connection. ```json { "enabled": false, "concurrency": 8 } ``` -------------------------------- ### Outbound Configuration Object Source: https://www.v2fly.org/config/protocols/shadowsocks.html Defines the settings for a Shadowsocks outbound proxy, containing an array of server objects. ```json { "servers": [ { "email": "love@v2ray.com", "address": "127.0.0.1", "port": 1234, "method": "加密方式", "password": "密码", "level": 0 } ] } ``` -------------------------------- ### Server Object Source: https://www.v2fly.org/config/protocols/shadowsocks.html Defines the connection details for a specific Shadowsocks server within an outbound configuration. ```json { "email": "love@v2ray.com", "address": "127.0.0.1", "port": 1234, "method": "加密方式", "password": "密码", "level": 0, "ivCheck": false } ``` -------------------------------- ### Configure KcpObject settings Source: https://www.v2fly.org/config/transport/mkcp.html Defines the transport configuration for mKCP, including MTU, timing intervals, capacity limits, and obfuscation seeds. ```json { "mtu": 1350, "tti": 20, "uplinkCapacity": 5, "downlinkCapacity": 20, "congestion": false, "readBufferSize": 1, "writeBufferSize": 1, "header": { "type": "none" }, "seed": "Password" } ``` -------------------------------- ### SockoptObject JSON Structure Source: https://www.v2fly.org/config/transport.html The default configuration structure for socket options. ```json { "mark": 0, "tcpFastOpen": false, "tcpFastOpenQueueLength": 4096, "tproxy": "off", "tcpKeepAliveInterval": 0, "bindToDevice": "eth0", "mptcp": false } ```