From 5899abe0b788835c4c4a05c4d3e3934078577fe2 Mon Sep 17 00:00:00 2001 From: mm644706215 Date: Tue, 30 Sep 2025 23:51:40 +0800 Subject: [PATCH] update --- client/config/config.yaml | 125 ++++++++++++++++++++++++++++++++++ client/docker-compose.yml | 41 ++++++++--- client/test-speed.ps1 | 58 ---------------- client/v2ray-client-grpc.json | 47 ------------- client/v2ray-client.json | 43 ------------ client/v2ray-clientbak.json | 48 ------------- 6 files changed, 155 insertions(+), 207 deletions(-) create mode 100644 client/config/config.yaml delete mode 100644 client/test-speed.ps1 delete mode 100644 client/v2ray-client-grpc.json delete mode 100644 client/v2ray-client.json delete mode 100644 client/v2ray-clientbak.json diff --git a/client/config/config.yaml b/client/config/config.yaml new file mode 100644 index 0000000..ff2b8a1 --- /dev/null +++ b/client/config/config.yaml @@ -0,0 +1,125 @@ +port: 7890 +allow-lan: true +mode: rule +log-level: info +unified-delay: true +global-client-fingerprint: chrome +dns: + enable: false + listen: :53 + ipv6: true + enhanced-mode: fake-ip + fake-ip-range: 198.18.0.1/16 + default-nameserver: + - 223.5.5.5 + - 8.8.8.8 + nameserver: + - https://dns.alidns.com/dns-query + - https://doh.pub/dns-query + fallback: + - https://1.0.0.1/dns-query + - tls://dns.google + fallback-filter: + geoip: true + geoip-code: CN + ipcidr: + - 240.0.0.0/4 + +proxies: +- name: vless-reality-vision-molecular.eu.org + type: vless + server: 74.48.136.93 + port: 27837 + uuid: d154f99a-0bcd-4db3-8e02-b578dfcb1bf7 + network: tcp + udp: true + tls: true + flow: xtls-rprx-vision + servername: apple.com + reality-opts: + public-key: D-Y-_cYUj-d9dz6J4hM4XEkYzRIx_EXeI-eJGC-XK2I + short-id: a592e159 + client-fingerprint: chrome + +- name: vmess-ws-molecular.eu.org + type: vmess + server: p.molecular.eu.org + port: 2087 + uuid: d154f99a-0bcd-4db3-8e02-b578dfcb1bf7 + alterId: 0 + cipher: auto + udp: true + tls: true + network: ws + servername: p.molecular.eu.org + ws-opts: + path: "d154f99a-0bcd-4db3-8e02-b578dfcb1bf7-vm" + headers: + Host: p.molecular.eu.org + + + + + +- name: hysteria2-molecular.eu.org + type: hysteria2 + server: p.molecular.eu.org + port: 64614 + password: d154f99a-0bcd-4db3-8e02-b578dfcb1bf7 + alpn: + - h3 + sni: p.molecular.eu.org + skip-cert-verify: false + fast-open: true + +- name: tuic5-molecular.eu.org + server: p.molecular.eu.org + port: 24954 + type: tuic + uuid: d154f99a-0bcd-4db3-8e02-b578dfcb1bf7 + password: d154f99a-0bcd-4db3-8e02-b578dfcb1bf7 + alpn: [h3] + disable-sni: true + reduce-rtt: true + udp-relay-mode: native + congestion-controller: bbr + sni: p.molecular.eu.org + skip-cert-verify: false + +proxy-groups: +- name: 负载均衡 + type: load-balance + url: https://www.gstatic.com/generate_204 + interval: 300 + strategy: round-robin + proxies: + - vless-reality-vision-molecular.eu.org + - vmess-ws-molecular.eu.org + - hysteria2-molecular.eu.org + - tuic5-molecular.eu.org + +- name: 自动选择 + type: url-test + url: https://www.gstatic.com/generate_204 + interval: 300 + tolerance: 50 + proxies: + - vless-reality-vision-molecular.eu.org + - vmess-ws-molecular.eu.org + - hysteria2-molecular.eu.org + - tuic5-molecular.eu.org + +- name: 🌍选择代理节点 + type: select + proxies: + - 负载均衡 + - 自动选择 + - DIRECT + - vless-reality-vision-molecular.eu.org + - vmess-ws-molecular.eu.org + - hysteria2-molecular.eu.org + - tuic5-molecular.eu.org +rules: + - GEOIP,LAN,DIRECT + - GEOIP,CN,DIRECT + - MATCH,🌍选择代理节点 \ No newline at end of file diff --git a/client/docker-compose.yml b/client/docker-compose.yml index 83c8b07..2644e30 100644 --- a/client/docker-compose.yml +++ b/client/docker-compose.yml @@ -1,13 +1,32 @@ -version: "3.9" - services: - v2ray-client: - image: v2fly/v2fly-core:latest - container_name: v2ray-client - restart: unless-stopped - volumes: - - ./v2ray-client.json:/etc/v2ray/config.json:ro - command: ["run", "-c", "/etc/v2ray/config.json"] + proxy: + image: metacubex/mihomo + container_name: proxy + restart: always + # 只绑定本地回环地址 ports: - - "127.0.0.1:11080:11080" # SOCKS5 - - "127.0.0.1:18080:18080" # HTTP + - "0.0.0.0:7890:7890" # mixed-port (HTTP/SOCKS) + - "7891:7891" # SOCKS5 代理 + - "127.0.0.1:9090:9090" # API 控制口 + volumes: + - ./config:/root/.config/mihomo + environment: + - GEOIP_URL=https://ghproxy.dockless.eu.org//https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb + - GEOSITE_URL=https://ghproxy.dockless.eu.org/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat + - SUBSCRIPTION_URL=https://app.mitce.net/?sid=303534&token=srveqevu + healthcheck: + test: + [ + "CMD-SHELL", + "netstat -tln | grep -q ':7890'" + ] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + networks: + - proxy_net + +networks: + proxy_net: + external: true \ No newline at end of file diff --git a/client/test-speed.ps1 b/client/test-speed.ps1 deleted file mode 100644 index d53c166..0000000 --- a/client/test-speed.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -param( - [ValidateSet("http","socks")] - [string]$Mode = "http", - - [int]$SizeMB = 50 -) - -# Build proxy value and target URL -$proxy = if ($Mode -eq "http") { "http://127.0.0.1:8080" } else { "socks5h://127.0.0.1:1080" } -$envVar = if ($Mode -eq "http") { "HTTPS_PROXY" } else { "ALL_PROXY" } -$bytes = [int64]$SizeMB * 1MB -$testUrl = "https://speed.cloudflare.com/__down?bytes=$bytes" - -Write-Host "Mode: $Mode Proxy: $proxy Size: $SizeMB MB" -ForegroundColor Cyan - -# Set proxy env only for this process -[System.Environment]::SetEnvironmentVariable($envVar, $proxy, 'Process') - -function Test-Health { - try { - Write-Host "Checking server health via proxy..." -ForegroundColor Yellow - $health = & curl.exe -I https://molecular.eu.org/_health 2>&1 - $line = ($health | Select-String -Pattern "HTTP/").ToString() - Write-Host $line -ForegroundColor Green - } catch { - Write-Host "Health check failed: $_" -ForegroundColor Red - } -} - -function Test-Download { - param([string]$Url) - Write-Host "Running download test: $Url" -ForegroundColor Yellow - $result = & curl.exe -sS -o NUL -w "time_namelookup=%{time_namelookup} time_connect=%{time_connect} time_starttransfer=%{time_starttransfer} time_total=%{time_total} speed_download=%{speed_download}\n" $Url - if (-not $result) { Write-Host "curl produced no output." -ForegroundColor Red; return } - - $kv = @{} - foreach ($pair in $result.Trim().Split(' ')) { - if ($pair -match "=") { - $k,$v = $pair.Split('='); $kv[$k] = [double]$v - } - } - $mbps = [math]::Round(($kv['speed_download'] * 8.0) / 1e6, 2) - Write-Host ("Latency(connect): {0} s | TTFB: {1} s | Total: {2} s | Throughput: {3} Mbps" -f ` - $kv['time_connect'], $kv['time_starttransfer'], $kv['time_total'], $mbps) -ForegroundColor Green -} - -Test-Health -Test-Download -Url $testUrl - -# Optional: run a smaller warm-up and a larger sustained test -if ($SizeMB -lt 20) { - Test-Download -Url "https://speed.cloudflare.com/__down?bytes=20000000" # 20MB -} -if ($SizeMB -lt 100) { - Test-Download -Url "https://speed.cloudflare.com/__down?bytes=100000000" # 100MB -} - -Write-Host "Done." -ForegroundColor Cyan diff --git a/client/v2ray-client-grpc.json b/client/v2ray-client-grpc.json deleted file mode 100644 index 867bd04..0000000 --- a/client/v2ray-client-grpc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "log": { - "loglevel": "info" - }, - "inbounds": [ - { - "port": 11080, - "listen": "0.0.0.0", - "protocol": "socks", - "settings": { "auth": "noauth", "udp": true } - }, - { - "port": 18080, - "listen": "0.0.0.0", - "protocol": "http", - "settings": {} - } - ], - "outbounds": [ - { - "protocol": "vless", - "settings": { - "vnext": [ - { - "address": "molecular.eu.org", - "port": 443, - "users": [ - { "id": "8f5e3b57-5a3d-4a3e-9f3c-9c6c2d6a9f1e", "encryption": "none" } - ] - } - ] - }, - "streamSettings": { - "network": "grpc", - "security": "tls", - "tlsSettings": { - "serverName": "molecular.eu.org", - "alpn": ["h2"] - }, - "grpcSettings": { - "serviceName": "grpc", - "multiMode": true - } - } - } - ] -} diff --git a/client/v2ray-client.json b/client/v2ray-client.json deleted file mode 100644 index 83e0ec6..0000000 --- a/client/v2ray-client.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "log": { - "loglevel": "info" - }, - "inbounds": [ - { - "port": 11080, - "listen": "0.0.0.0", - "protocol": "socks", - "settings": { "auth": "noauth", "udp": true } - }, - { - "port": 18080, - "listen": "0.0.0.0", - "protocol": "http", - "settings": {} - } - ], - "outbounds": [ - { - "protocol": "vless", - "settings": { - "vnext": [ - { - "address": "molecular.eu.org", - "port": 443, - "users": [ - { "id": "8f5e3b57-5a3d-4a3e-9f3c-9c6c2d6a9f1e", "encryption": "none" } - ] - } - ] - }, - "streamSettings": { - "network": "grpc", - "security": "tls", - "grpcSettings": { - "serviceName": "grpc", - "multiMode": true - } - } - } - ] -} diff --git a/client/v2ray-clientbak.json b/client/v2ray-clientbak.json deleted file mode 100644 index 00997cd..0000000 --- a/client/v2ray-clientbak.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "log": { - "loglevel": "info" - }, - "inbounds": [ - { - "port": 11080, - "listen": "0.0.0.0", - "protocol": "socks", - "settings": { - "auth": "noauth", - "udp": true - } - }, - { - "port": 18080, - "listen": "0.0.0.0", - "protocol": "http", - "settings": {} - } - ], - "outbounds": [ - { - "protocol": "vless", - "settings": { - "vnext": [ - { - "address": "molecular.eu.org", - "port": 443, - "users": [ - { - "id": "8f5e3b57-5a3d-4a3e-9f3c-9c6c2d6a9f1e", - "encryption": "none" - } - ] - } - ] - }, - "streamSettings": { - "network": "ws", - "security": "tls", - "wsSettings": { - "path": "/ray" - } - } - } - ] -} \ No newline at end of file