Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen3-30b-a3b· Alibaba (Qwen)Hugging Face LMArena Human Preference 140K

In case I choose neko box. How do I set up such routing rule that I want to proxy only…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with chatgpt-4o-latest-20250326’s answer.
  1. User

    In case I choose neko box. How do I set up such routing rule that I want to proxy only example.com site and all other traffic to be direct?

  2. Qwen Assistant

    To set up Nekoray (formerly known as Neko Box) to proxy only example.com and route all other traffic directly, follow these steps:


    Step-by-Step Guide

    1. Ensure Nekoray is Configured with a Proxy

    • Make sure you have a working proxy configuration (e.g., V2Ray, Xray, or Shadowsocks) added to Nekoray. This is the "Proxy" server that will handle example.com.

    2. Locate the Configuration File

    • Open Nekoray.
    • Go to Profiles > Edit (or click the gear icon).
    • Find the config.json file for your profile. This is the core configuration file for V2Ray/Xray.

    3. Modify the Routing Rules

    In the config.json, locate the "routing" section. Replace or update it with the following:

    "routing": {
      "domainStrategy": "IP",  // Use IP-based routing for better compatibility
      "rules": [
        {
          "type": "domain",
          "domain": "example.com",
          "outboundTag": "Proxy"  // Send only example.com to the proxy
        },
        {
          "type": "range",
          "ip": ["0.0.0.0/0"],
          "outboundTag": "Direct"  // Default: all other traffic goes direct
        }
      ]
    }
    

    Explanation:

    • "type": "domain" matches the exact domain example.com.
    • "outboundTag": "Proxy" routes this traffic through your proxy.
    • The second rule ("type": "range") acts as a fallback for all other traffic, sending it directly.

    4. Save and Reload the Configuration

    • Save the config.json file.
    • In Nekoray, go to Profiles > Reload (or restart the app) to apply the changes.

    5. Test the Setup

    • Open a browser and visit example.com. It should use the proxy.
    • Visit another site (e.g., google.com). It should bypass the proxy (direct connection).

    Key Notes

    • Domain Matching:
      • Use "type": "domain" for exact domain matches (e.g., example.com).
      • Use "type": "domain-suffix" for subdomains (e.g., *.example.com).
    • Default Rule: The last rule in the rules array acts as the fallback. Ensure it routes to "Direct".
    • Troubleshooting: If traffic isn’t routing as expected, check the Nekoray logs (under Tools > Log) for errors.

    Alternative: Use Nekoray’s GUI (if available)

    If Nekoray has a visual rule editor (check the latest version), you can:

    1. Go to Routing > Add Rule.
    2. Set:
      • Type: Domain
      • Domain: example.com
      • Outbound: Your proxy server (e.g., Proxy)
    3. Add a default rule for all other traffic:
      • Type: Range
      • IP: 0.0.0.0/0
      • Outbound: Direct

    Why This Works

    • Nekoray uses V2Ray/Xray under the hood, which supports domain-based routing.
    • The "domainStrategy": "IP" ensures compatibility with IP-based rules (e.g., blocking China’s IP ranges).

    Let me know if you need help converting a subscription link or troubleshooting! 🚀

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.