mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
249 lines
7.7 KiB
Plaintext
249 lines
7.7 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Golden-snapshot fixture for the protocol adapter: one node per protocol the
|
|
# adapter can build an outbound for, with a value on each option that has a
|
|
# mapping. tests/ucode/test_golden_outbounds.sh turns this into
|
|
# tests/snapshots/generator/outbounds.json and diffs it on every run.
|
|
#
|
|
# It replaces test_demo_architecture.sh, which compared the production
|
|
# OutboundFactory against itself and therefore could never fail. The
|
|
# snapshot pins the actual emitted JSON, so adding, removing or re-mapping a
|
|
# field for any protocol shows up as a reviewable diff.
|
|
#
|
|
# WireGuard is absent on purpose: it is emitted as a sing-box endpoint, not an
|
|
# outbound, and is covered by wireguard.uci.
|
|
|
|
config homeproxy-pro 'config'
|
|
option routing_mode 'bypass_mainland_china'
|
|
option proxy_mode 'tun'
|
|
option ipv6_support '0'
|
|
option main_node 'n_vless_reality_ws'
|
|
option main_udp_node 'nil'
|
|
|
|
config homeproxy-pro 'infra'
|
|
option mixed_port '5330'
|
|
option dns_port '5333'
|
|
option tun_name 'singtun0'
|
|
option tun_addr4 '172.19.0.1/30'
|
|
option tun_addr6 'fdfe:dcba:9876::1/126'
|
|
option tun_mtu '9000'
|
|
option self_mark '100'
|
|
option tun_mark '102'
|
|
option table_mark '100'
|
|
option ntp_server 'nil'
|
|
|
|
config node 'n_vless_reality_ws'
|
|
option label 'vless-reality-ws'
|
|
option type 'vless'
|
|
option address 'b.example.com'
|
|
option port '443'
|
|
option uuid '3af88561-9c69-4b19-8f7e-f08d580bc339'
|
|
option transport 'ws'
|
|
option ws_host 'b.example.com'
|
|
option ws_path '/ws?ed=2048'
|
|
option websocket_early_data_header 'Sec-WebSocket-Protocol'
|
|
option websocket_early_data '2048'
|
|
option tls '1'
|
|
option tls_sni 'b.example.com'
|
|
option tls_alpn 'h2,http/1.1'
|
|
option tls_min_version '1.2'
|
|
option tls_max_version '1.3'
|
|
option tls_handshake_timeout '10'
|
|
option tls_cipher_suites 'TLS_AES_128_GCM_SHA256'
|
|
option tls_reality '1'
|
|
option tls_reality_public_key '4UAg690QziXeelpUJoAmXiim0gfQESSiJkNfvF-o8Uw'
|
|
option tls_reality_short_id 'abcd'
|
|
option tls_utls 'chrome'
|
|
option vless_flow 'xtls-rprx-vision'
|
|
option packet_encoding 'xudp'
|
|
# Stale option left behind by switching this node's type from
|
|
# shadowsocks: sing-box rejects udp_over_tcp on a vless outbound, so the
|
|
# adapter must ignore it. See OPTION_FIELDS.vless.
|
|
option udp_over_tcp '1'
|
|
option udp_over_tcp_version '2'
|
|
option multiplex '1'
|
|
option multiplex_protocol 'h2mux'
|
|
option multiplex_max_connections '4'
|
|
option multiplex_min_streams '2'
|
|
option multiplex_max_streams '8'
|
|
option multiplex_padding '1'
|
|
option tcp_fast_open '1'
|
|
option tcp_multi_path '0'
|
|
option udp_fragment '1'
|
|
|
|
config node 'n_vmess_http'
|
|
option label 'vmess-http'
|
|
option type 'vmess'
|
|
option address 'l.example.com'
|
|
option port '443'
|
|
option uuid '66666666-7777-8888-9999-aaaaaaaaaaaa'
|
|
option transport 'http'
|
|
option http_host 'l.example.com'
|
|
option http_path '/path'
|
|
option http_method 'GET'
|
|
option http_idle_timeout '30'
|
|
option http_ping_timeout '15'
|
|
option vmess_alterid '0'
|
|
option vmess_encrypt 'auto'
|
|
option vmess_global_padding '1'
|
|
option packet_encoding 'packetaddr'
|
|
option tls '1'
|
|
option tls_sni 'l.example.com'
|
|
option tls_insecure '1'
|
|
option tls_utls 'firefox'
|
|
|
|
config node 'n_trojan_grpc'
|
|
option label 'trojan-grpc'
|
|
option type 'trojan'
|
|
option address 'h.example.com'
|
|
option port '443'
|
|
option password 'trojan-pwd'
|
|
option transport 'grpc'
|
|
option grpc_servicename 'gs'
|
|
option grpc_permit_without_stream '1'
|
|
option tls '1'
|
|
option tls_sni 'h.example.com'
|
|
|
|
config node 'n_hysteria'
|
|
option label 'hysteria'
|
|
option type 'hysteria'
|
|
option address 'm.example.com'
|
|
option port '443'
|
|
option hysteria_auth_type 'string'
|
|
option hysteria_auth_payload 'hy1-auth'
|
|
option hysteria_up_mbps '100'
|
|
option hysteria_down_mbps '500'
|
|
option hysteria_obfs_type 'xplus'
|
|
option hysteria_obfs_password 'hy1-obfs'
|
|
option hysteria_hop_interval '30'
|
|
option tls '1'
|
|
option tls_sni 'm.example.com'
|
|
|
|
config node 'n_hy2'
|
|
option label 'hy2'
|
|
option type 'hysteria2'
|
|
option address 'k.example.com'
|
|
option port '443'
|
|
option password 'hy2-pwd'
|
|
option hysteria_obfs_type 'salamander'
|
|
option hysteria_obfs_password 'hy2-obfs'
|
|
option hysteria_up_mbps '100'
|
|
option hysteria_down_mbps '500'
|
|
option hysteria_bbr_profile 'conservative'
|
|
option hysteria_hopping_port '20000:30000'
|
|
option hysteria_hop_interval '30'
|
|
option hysteria_hop_interval_max '60'
|
|
option hysteria_disable_chrome_parrot '1'
|
|
option tls '1'
|
|
option tls_sni 'k.example.com'
|
|
|
|
config node 'n_tuic'
|
|
option label 'tuic'
|
|
option type 'tuic'
|
|
option address 'j.example.com'
|
|
option port '443'
|
|
option uuid '11111111-2222-3333-4444-555555555555'
|
|
option password 'tuic-pwd'
|
|
option tuic_congestion_control 'cubic'
|
|
option tuic_udp_relay_mode 'native'
|
|
option tuic_enable_zero_rtt '1'
|
|
option tuic_udp_over_stream '0'
|
|
option tuic_heartbeat '3s'
|
|
option tls '1'
|
|
option tls_sni 'j.example.com'
|
|
option tls_alpn 'h3'
|
|
|
|
config node 'n_shadowsocks'
|
|
option label 'ss'
|
|
option type 'shadowsocks'
|
|
option address 'd.example.com'
|
|
option port '8389'
|
|
option shadowsocks_encrypt_method 'aes-256-gcm'
|
|
option password 'ss-password'
|
|
option shadowsocks_plugin 'obfs-local'
|
|
option shadowsocks_plugin_opts 'obfs=http;obfs-host=d.example.com'
|
|
option udp_over_tcp '1'
|
|
option udp_over_tcp_version '2'
|
|
|
|
config node 'n_snell'
|
|
option label 'snell'
|
|
option type 'snell'
|
|
option address 'c.example.com'
|
|
option port '8388'
|
|
option password 'snell-psk'
|
|
option snell_version '4'
|
|
option snell_userkey 'snell-userkey'
|
|
option snell_reuse '1'
|
|
option snell_obfs_mode 'http'
|
|
option snell_obfs_host 'c.example.com'
|
|
|
|
config node 'n_socks'
|
|
option label 'socks'
|
|
option type 'socks'
|
|
option address 'g.example.com'
|
|
option port '1080'
|
|
option username 'bob'
|
|
option password 'socks-pwd'
|
|
option socks_version '5'
|
|
option udp_over_tcp '1'
|
|
option udp_over_tcp_version '2'
|
|
|
|
config node 'n_http'
|
|
option label 'http'
|
|
option type 'http'
|
|
option address 'f.example.com'
|
|
option port '8080'
|
|
option username 'alice'
|
|
option password 'http-pwd'
|
|
option tls '1'
|
|
option tls_sni 'f.example.com'
|
|
|
|
config node 'n_shadowtls'
|
|
option label 'shadowtls'
|
|
option type 'shadowtls'
|
|
option address 'i.example.com'
|
|
option port '443'
|
|
option password 'shadowtls-pwd'
|
|
option shadowtls_version '3'
|
|
option tls '1'
|
|
option tls_sni 'i.example.com'
|
|
|
|
config node 'n_anytls'
|
|
option label 'anytls'
|
|
option type 'anytls'
|
|
option address 'e.example.com'
|
|
option port '443'
|
|
option password 'anytls-pwd'
|
|
option anytls_idle_session_check_interval '30'
|
|
option anytls_idle_session_timeout '90'
|
|
option anytls_min_idle_session '2'
|
|
option tls '1'
|
|
option tls_sni 'e.example.com'
|
|
|
|
config node 'n_ssh'
|
|
option label 'ssh'
|
|
option type 'ssh'
|
|
option address 'n.example.com'
|
|
option port '22'
|
|
option username 'root'
|
|
# The node form stores the private key as a DynamicList, so UCI holds one
|
|
# list entry per line and the adapter has to re-join them into the single
|
|
# string sing-box expects. Throwaway test key.
|
|
list ssh_priv_key '-----BEGIN OPENSSH PRIVATE KEY-----'
|
|
list ssh_priv_key 'b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW'
|
|
list ssh_priv_key 'QyNTUxOQAAACAY0ADv5F4CV2TlGkNg2c3z3zBfeCDjLEusnrtYyxjNpAAAAJgit4/AIreP'
|
|
list ssh_priv_key 'wAAAAAtzc2gtZWQyNTUxOQAAACAY0ADv5F4CV2TlGkNg2c3z3zBfeCDjLEusnrtYyxjNpA'
|
|
list ssh_priv_key 'AAAEC4rRAsuFAQRHkpIDid/Cj0n1PS6o88D3xsDoYkDUVx0xjQAO/kXgJXZOUaQ2DZzfPf'
|
|
list ssh_priv_key 'MF94IOMsS6yeu1jLGM2kAAAADmhvbWVwcm94eS10ZXN0AQIDBAUGBw=='
|
|
list ssh_priv_key '-----END OPENSSH PRIVATE KEY-----'
|
|
option ssh_client_version 'SSH-2.0-OpenSSH_8.9p1'
|
|
list ssh_host_key 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBjQAO/kXgJXZOUaQ2DZzfPfMF94IOMsS6yeu1jLGM2k homeproxy-pro-test'
|
|
list ssh_host_key_algo 'ssh-ed25519'
|
|
|
|
config node 'n_direct'
|
|
option label 'direct'
|
|
option type 'direct'
|
|
option override_address '1.1.1.1'
|
|
option override_port '443'
|
|
option tcp_fast_open '1'
|