### Query Documentation with GET Request Source: https://kb.nssurge.com/surge-knowledge-base/technotes/reject.md To ask questions about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be in natural language. ```http GET https://kb.nssurge.com/surge-knowledge-base/technotes/reject.md?ask= ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://kb.nssurge.com/surge-knowledge-base/faq Use this HTTP GET request to dynamically query the documentation. Append the 'ask' query parameter with your specific question to get a direct answer and relevant excerpts. ```http GET https://kb.nssurge.com/surge-knowledge-base/faq.md?ask= ``` -------------------------------- ### Query Documentation Endpoint Source: https://kb.nssurge.com/surge-knowledge-base/technotes/ipv6-ra.md Use this GET request to query the documentation. Append your question as the value for the 'ask' query parameter. ```bash GET https://kb.nssurge.com/surge-knowledge-base/technotes/ipv6-ra.md?ask= ``` -------------------------------- ### Snell Proxy Protocol Support Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Configuration example for the Snell proxy protocol. ```ini snell-proxy = , , ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://kb.nssurge.com/surge-knowledge-base/license/mac-fus.md Use this method to ask questions about the documentation when the answer is not explicitly present on the current page. The question should be specific and self-contained. ```http GET https://kb.nssurge.com/surge-knowledge-base/license/mac-fus.md?ask= ``` -------------------------------- ### Configure UDP Testing Endpoint Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-ios.md Configure the UDP testing endpoint for proxies. Example shows testing against Google DNS. ```Surge Configuration proxy-test-udp = google.com@1.1.1.1 ``` -------------------------------- ### Query Documentation with GET Request Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/ponte.md Use this method to ask questions about the documentation when the answer is not explicitly present on the page. The question should be specific and self-contained. ```http GET https://kb.nssurge.com/surge-knowledge-base/guidelines/ponte.md?ask= ``` -------------------------------- ### Ask a Question via Documentation API Source: https://kb.nssurge.com/surge-knowledge-base/llms.txt Use this GET request to ask a specific question about the documentation. The response includes a direct answer and relevant excerpts. ```HTTP GET https://kb.nssurge.com/surge-knowledge-base/release-notes/snell.md?ask= ``` -------------------------------- ### Run iperf3 TCP Loopback Test Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-6-release-note.md Use this command to test TCP loopback throughput. Start the server in one terminal and the client in another. ```bash iperf3-darwin -s ``` ```bash iperf3-darwin -Rc lvh.me ``` ```bash iperf3-darwin -c lvh.me ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/smart-group.md Use this method to ask questions about the documentation when the answer is not explicitly present on the page. The question should be specific and self-contained. ```http GET https://kb.nssurge.com/surge-knowledge-base/guidelines/smart-group.md?ask= ``` -------------------------------- ### MitM Hostname with Port Number Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Example of enabling MitM for specific ports on a hostname, or all ports using ':0'. ```ini hostname = example.com:8443 ``` ```ini hostname = example.com:0 ``` -------------------------------- ### Subnet Expression Examples Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Examples of subnet expressions used for matching Wi-Fi SSIDs, BSSIDs, router IP addresses, and network types. ```text SSID:value ``` ```text BSSID:value ``` ```text ROUTER:value ``` ```text TYPE:WIFI ``` ```text TYPE:WIRED ``` ```text TYPE:CELLULAR ``` ```text MCCMNC:100-200 ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/gateway.md Use this method to dynamically query the documentation when an answer is not explicitly present on the current page. The question should be specific and self-contained. ```http GET https://kb.nssurge.com/surge-knowledge-base/guidelines/gateway.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://kb.nssurge.com/surge-knowledge-base/release-notes Use this method to ask questions about the documentation when the answer is not explicitly present on the page. The question should be specific and in natural language. ```http GET https://kb.nssurge.com/surge-knowledge-base/release-notes.md?ask= ``` -------------------------------- ### Tailscale Rule Configuration Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/tailscale.md Example rules for routing traffic through the 'ts-home' Tailscale proxy policy. It includes CIDR, domain suffix, and a final fallback rule. ```ini [Rule] IP-CIDR,100.64.0.0/10,ts-home,no-resolve DOMAIN-SUFFIX,internal.example.ts.net,ts-home FINAL,DIRECT ``` -------------------------------- ### Enable iperf3 Client Mode Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-ios.md Benchmark bandwidth using the iperf3 client mode. Leave the hostname field empty to use 127.0.0.1, indicating the proxy server itself. Ensure iperf3 is installed and running on the proxy server. ```plaintext 127.0.0.1 will be used and indicates the proxy server itself. ``` -------------------------------- ### Configure DNS over QUIC Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Use this setting to enable DNS over QUIC. Replace 'example.com' with your desired DNS server address. ```ini encrypted-dns-server = quic://example.com ``` -------------------------------- ### MitM Hostname Exclusion Example Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Example of excluding specific domains from MitM interception using a prefix '-'. ```ini [MITM] hostname = -*.apple.com, -*.icloud.com, * ``` -------------------------------- ### Configure DNS over HTTP/3 Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Use this setting to enable DNS over HTTP/3. Replace 'example.com' with your desired DNS server address and '/dns-query' with the correct path. ```ini encrypted-dns-server = h3://example.com/dns-query ``` -------------------------------- ### Surge CLI Help Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Run 'surge-cli --help' to view available commands and options for the Surge command-line interface. ```bash surge-cli --help ``` -------------------------------- ### Query Documentation Dynamically Source: https://kb.nssurge.com/surge-knowledge-base/guidelines Use this method to ask questions about the documentation and receive direct answers with relevant excerpts. The question should be specific and in natural language. ```http GET https://kb.nssurge.com/surge-knowledge-base/guidelines.md?ask= ``` -------------------------------- ### VMess Proxy Configuration Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Configuration example for the VMess proxy protocol, including WebSocket and TLS options. Ensure the server supports chacha20-poly1305 encryption. ```ini vmess-proxy= vmess, example.com, 443, username = 12345678-abcd-1234-1234-47ffca0ce229, ws=true, tls=true, ws-path=/v2, ws-headers=X-Header-1:value|X-Header-2:value ``` -------------------------------- ### Use Case 1: Including Managed Proxy Configurations Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/detached-profile.md Use this when you need to incorporate proxy policies and groups from a managed configuration file without using its other sections. ```ini [Proxy] #!include ManagedProfile.conf [Proxy Group] #!include ManagedProfile.conf ``` -------------------------------- ### Get IP Organization using $utils.ipaso Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md This helper function retrieves the organization associated with a given IP address. It requires the IP address as a string argument. ```javascript $utils.ipaso(ipAddress) ``` -------------------------------- ### Query Documentation Dynamically Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/troubleshooting.md Use this method to ask questions about the documentation when the answer is not explicitly present on the current page. The question should be specific and self-contained. ```http GET https://kb.nssurge.com/surge-knowledge-base/guidelines/troubleshooting.md?ask= ``` -------------------------------- ### Get IP ASN using $utils.ipasn Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md This helper function retrieves the Autonomous System Number (ASN) for a given IP address. It requires the IP address as a string argument. ```javascript $utils.ipasn(ipAddress) ``` -------------------------------- ### Snell Server Download Links Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/snell.md Direct download links for Snell server binaries across different Linux architectures. Ensure you download the correct version for your system. ```markdown https://dl.nssurge.com/snell/snell-server-v5.0.1-linux-amd64.zip https://dl.nssurge.com/snell/snell-server-v5.0.1-linux-i386.zip https://dl.nssurge.com/snell/snell-server-v5.0.1-linux-aarch64.zip https://dl.nssurge.com/snell/snell-server-v5.0.1-linux-armv7l.zip ``` -------------------------------- ### Accessing Services via Ponte Domain Name Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/ponte.md Use the ponte-name.sgponte domain to access services on a Surge Ponte enabled device. For example, access an HTTP server on port 8080. ```text http://mymacmini.sgponte:8080/ ``` -------------------------------- ### Snell v4.1.1 Server Downloads Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/snell.md Direct download links for the Snell server version 4.1.1 for various Linux architectures. ```markdown https://dl.nssurge.com/snell/snell-server-v4.1.1-linux-amd64.zip https://dl.nssurge.com/snell/snell-server-v4.1.1-linux-i386.zip https://dl.nssurge.com/snell/snell-server-v4.1.1-linux-aarch64.zip https://dl.nssurge.com/snell/snell-server-v4.1.1-linux-armv7l.zip ``` -------------------------------- ### Configure DOMAIN-SET Rule Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-ios.md Use the DOMAIN-SET rule type to manage large sets of hostnames or IP addresses. Each line in the specified file represents a rule. Sub-domains are matched if the hostname starts with a dot. ```plaintext [Rule] DOMAIN-SET,hostname.txt,REJECT ``` -------------------------------- ### Snell v6.0.0 Beta 3 Server Downloads Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/snell.md Direct download links for the Snell server version 6.0.0 beta 3 for various Linux architectures. ```markdown https://dl.nssurge.com/snell/snell-server-v6.0.0b3-linux-amd64.zip https://dl.nssurge.com/snell/snell-server-v6.0.0b3-linux-i386.zip https://dl.nssurge.com/snell/snell-server-v6.0.0b3-linux-aarch64.zip ``` -------------------------------- ### Basic Detached Profile Structure Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/detached-profile.md Demonstrates the basic structure for including separate configuration files for different sections like Proxy, Proxy Group, and Rule. ```ini [General] loglevel = notify [Proxy] #!include Proxy1.dconf, Proxy2.dconf [Proxy Group] #!include Group.dconf [Rule] #!include Rule.dconf ``` -------------------------------- ### Host Section Optimization with DOMAIN-SET and RULE-SET Source: https://kb.nssurge.com/surge-knowledge-base/release-notes/surge-mac-legacy.md Optimize the [Host] section by using DOMAIN-SET and RULE-SET for improved matching efficiency. This allows for more efficient management of host configurations. ```ini [Host] DOMAIN-SET:https://example.com/domains.txt = server:https://doh.com/dns-query RULE-SET:https://example.com/rules.txt = server:https://doh.com/dns-query ``` -------------------------------- ### Verify System Proxy Settings Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/troubleshooting.md Use this command to check if Surge has correctly configured the system proxy. Ensure HTTP and HTTPS ports are set to 6152. ```bash scutil --proxy ``` -------------------------------- ### Use Case 2: Sharing Common Configuration with Device-Specific Settings Source: https://kb.nssurge.com/surge-knowledge-base/guidelines/detached-profile.md This pattern is useful for sharing common configuration sections across multiple devices while allowing device-specific settings, such as WireGuard details, to be defined separately. ```ini [General] loglevel = notify [Proxy] #!include Common.conf [Proxy Group] #!include Common.conf [Rule] #!include Common.conf [WireGuard HomeServer] private-key = … ```