JSON structure and configuration ownership
Top-level objects and arrays
A standalone core typically reads a single top-level object. Inbounds and outbounds are arrays, since one process can have multiple listeners and exits. Routing is an object containing an array of rules. DNS, policy, and logging are also separate objects. Don’t confuse this configuration with client-exported subscription data, a single-node share link, or app settings. They may also contain ports or protocol fields, but they’re read by different components and use different field hierarchies.
{
"log": { "loglevel": "warning" },
"inbounds": [],
"outbounds": [{ "protocol": "freedom", "tag": "direct" }],
"routing": { "rules": [] }
}
This complete JSON example illustrates the hierarchy; it does not provide a usable listener. The order of top-level keys does not affect their meaning, but arrays are ordered. The first outbound commonly serves as the default when no rule matches, and routing rules are checked from top to bottom. An editor can reformat indentation, but avoid reordering these arrays. Even when two files contain identical keys and values, changing the order of rules or outbounds can change behavior.
| Top-level field | Container type | Check first |
|---|---|---|
inbounds | Array | Listener address, port, and protocol used by the application. |
outbounds | Array | Default outbound, tags, and outbound-specific settings. |
routing | Object | Rule order, matching fields, and target tags. |
dns | Object | Servers used by the built-in resolver and when it is called. |
policy | Object | Level mappings, connection timeouts, and statistics switches. |
Strict JSON uses double quotes for keys and strings. Numbers and Boolean values should not be quoted, and the last item must not have a trailing comma. Don’t repeat keys within the same object. Some editors accept comments or duplicate keys, while some loaders reject them or keep only the last value, making results hard to reproduce. If a port has no effect, check both its value and that you edited the sole relevant field in the current object—not a duplicate key or a field in another inbound.
Client interface vs. core configuration
On desktop, choose v2rayN from the Download page. Check local listener options under “Settings” and rules under “Routing.” The client may regenerate core configuration when you switch nodes, apply settings, or restart. For connections managed through the GUI, make changes there and check the logs. For configurations you maintain yourself, save a separate file and confirm how it is loaded. Don’t treat a temporary runtime file as a persistent setting.
v2rayNG and v2flyNG on Android manage their own app settings and use different cores. Don’t assume that local listeners, system proxy behavior, or data-file paths in a desktop configuration work the same way on mobile. Before migrating, identify what you actually need to carry over: node connection details, routing rules, or an app’s access method. Importing a node does not migrate desktop listeners or DNS settings, and seeing the same protocol name in a log does not mean every option was applied.
Trace symptoms back to the right layer
Sort errors into three stages: reading the file, creating a listener, and handling requests. For file-loading errors, check syntax and field placement. If no local listener appears after startup, check for port conflicts and address binding. If an app connects but gets the wrong result, then inspect routing, outbounds, and DNS. Start with the earliest failure to avoid blaming every issue on the node. If a restart makes no difference, check whether an old process still owns the port; its response may look like the new configuration is working.
The short snippets in the following chapters show members of a top-level object. If a top-level key already exists, merge the changes into its object or array instead of adding another key with the same name. To check a field’s behavior, use the complete example below in a separate file. Record the original value, the change, and a reproducible request. Comparing logs before and after is easier than replacing the whole configuration and then trying to guess which line took effect. Without a baseline for the complete configuration, it’s difficult to tell whether a problem came from the latest change or was already present.
inbounds — inbound listeners
Check the address, port, and protocol together
An inbound determines which applications can send requests to the core. When troubleshooting, check the listening address, port, and proxy protocol as a set. The app needs the local proxy endpoint—not a subscription URL or the remote node’s port. Pointing a local browser to a local SOCKS endpoint tests only that app’s connection path. Check separately whether the system proxy is enabled and whether other apps use system settings. An open proxy port does not mean all traffic passes through it.
{
"inbounds": [
{
"tag": "local-socks",
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": { "auth": "noauth", "udp": false },
"sniffing": { "enabled": false }
}
]
}
This listener binds only to the local IPv4 loopback address, which the app must use as well. If you replace the address with a hostname, the app may try IPv6 loopback first. The addresses may look equivalent, but the connection can still fail. For a connection refused error, check whether the current process is actually listening on the specified address and port, and whether another client is using the same listener. Don’t change the remote server address yet—the request hasn’t reached routing.
The proxy type must match the listener protocol. Even on the same numeric port, an HTTP proxy request and a SOCKS handshake are different. With the wrong type, an app may reach the port but disconnect during negotiation. If you run two listeners, give them different tags and ports, then test each with the corresponding app proxy setting. If only apps that use the system proxy work, check the port and protocol specified there before changing every listener to the same protocol.
UDP is disabled in this example so you can first verify basic TCP requests. Enabling udp only means this SOCKS listener can handle the relevant UDP forwarding requests. The app must support the required negotiation, the selected outbound must carry the traffic, and nothing in between can block it. Successful web browsing does not prove that voice, games, or other datagram-based traffic will work. Don’t infer that every type of traffic follows the same path from the result of a single app connection.
Inbound tags and sniffing limits
An inbound tag is a name referenced by rules, not a node label shown to users. Give each listener a distinct tag so inboundTag can distinguish connections from a browser, a tool, or a proxy relay. When renaming a tag, update its routing references too. If two apps use the same inbound, this condition alone can’t tell them apart. First check whether each app can connect to a different listener; don’t try to compensate by adding overlapping domain rules.
If an app resolves a domain locally before connecting, the inbound may receive only an IP address. Sniffing can identify host information in some protocols and request formats, but it cannot recover the original domain for every connection. In cores that support the relevant field, routeOnly lets sniffed information affect routing without replacing the original destination. When checking domain rules, compare the domain and address the app actually sends. Don’t assume enabling sniffing will fix every request that fails to match.
For shared access, first verify the listener on the host device, then connect from another device using the host’s LAN address, and only then adjust firewall rules. If the other device uses its own loopback address, it will connect to itself. If only the host can connect, check the bind address, network connection, and access rules separately. Disable sharing when you leave the trusted network, then verify that the loopback listener still works as before so temporary changes don’t become permanent defaults.
When handing off a configuration, document the listener address, protocol, and purpose together. An app may have several proxy settings, such as system proxy, in-app proxy, and extension proxy. First establish a baseline with a request that explicitly uses one proxy, then check the other entry points. If the interface says the proxy is enabled but no traffic appears, follow the system proxy steps to confirm the app uses system settings. To test a broken listener, temporarily switch the same app to a known-good one and compare handshake results. This helps separate app behavior from local listener problems.
outbounds — outbounds and tags
The protocol determines outbound behavior; routing selects by tag
An outbound determines how the core delivers a request. A direct outbound connects from the device running the core to the destination. A blocking outbound terminates matching requests. A remote proxy outbound negotiates with a server using its protocol. A tag is only a name; naming an outbound “direct” does not change its protocol behavior. If the logs show a tag was selected, find the outbound object with that tag and check its protocol and settings instead of guessing from its name.
{
"outbounds": [
{ "tag": "direct", "protocol": "freedom" },
{
"tag": "blocked",
"protocol": "blackhole",
"settings": { "response": { "type": "none" } }
}
]
}
Direct is first in this example. When no rule matches, traffic typically uses the first outbound—not an automatically selected fallback based on tag name. Move the block outbound to the top and unmatched requests will fail too. Conversely, if certain requests must use a specific outbound, making direct the default can send requests with missing rules directly. Before changing array order, test the existing default with a destination that clearly matches no rule, then test the same destination again.
After routing selects an outbound, a failed connection usually does not make the matcher try the next rule. Writing two rules with identical conditions and different outbounds does not create failover. First verify that the selected outbound can dial and complete its own protocol negotiation. If the default outbound works but the selected one fails, that proves only that the inbound and one path work—not that the other outbound’s settings are valid.
Remote server settings vs. transport settings
A remote proxy outbound needs a server address, server port, and user parameters supported by its protocol. These are distinct from the destination website’s domain and port, and from the local port apps use to connect. When editing a node in a GUI client, compare the settings with the provider’s details and the fields for that protocol. When changing transport methods, don’t fill missing values with user settings copied from another protocol; the same field name may allow different values under different protocols.
For outbounds that support it, streamSettings describes the transport and security settings for the remote connection. It does not change encryption for the website you open. The website’s secure connection and the client-to-remote-server connection are separate. If logs show an error while connecting to the proxy server, check its address, port, transport, and the server name agreed with the provider. Don’t disable certificate checks to bypass a security negotiation error; first identify which layer is failing.
Passing syntax checks does not mean the current core supports the requested transport and security combination. Desktop clients may manage different cores, and mobile clients are not guaranteed to support the same features as the desktop version in use. Before copying a node to another device, check which core the target client actually runs and whether it supports those options. If the interface has no corresponding fields, don’t assume an imported profile will make them work. For protocol terminology, see the protocol guide in Getting Started.
When debugging, distinguish the proxy server’s hostname from the request destination’s hostname. Even if the app submits the destination address, the proxy server may still need to resolve its own name and connect first. Even if that connection succeeds, the destination may fail because of remote rules or network conditions. Record whether the failure occurs during inbound negotiation, proxy connection, or the destination response, then check the configuration for that stage. For comparisons, change only the outbound while keeping the request destination, app, and inbound the same.
When building an outbound inventory, note the purpose of each entry, which core it belongs to, whether it depends on resolving a server hostname, and which rules select it. Document local direct, remote proxy, and test blocking outbounds separately; don’t copy node credentials into logs or screenshots. Before retiring an outbound, update its references and test the default. Remove the old object only after confirming no rules still select its tag. Making small, incremental changes is easier to review and less likely to leave stale references behind.
routing — rule order and matching
First match wins
Routing rules are checked from top to bottom. When a rule includes a destination domain, network type, and inbound tag, all configured conditions must be met. Each match list can contain multiple candidate values. To express “domain matches or address matches,” use two rules rather than putting both in one rule. Place narrow rules before broader rules that could match them; otherwise, the broader rule wins and the later exception is never checked.
{
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"inboundTag": ["local-socks"],
"domain": ["full:blocked.example"],
"outboundTag": "blocked"
},
{
"type": "field",
"inboundTag": ["local-socks"],
"domain": ["domain:example"],
"outboundTag": "direct"
}
]
}
}
This snippet refers to tags introduced in the previous two chapters. The first rule matches only requests from the specified inbound whose full domain is blocked.example. The second matches the domain suffix itself and all its subdomains. If you reverse the order, the broader suffix rule matches first and the blocking rule never takes effect. Reserved domains are used here to explain matching, not as real, accessible services. To test blocking, choose a destination that would otherwise work directly; see the complete example.
full: is for an exact hostname; domain: matches the domain itself and its subdomains. Don’t include a webpage path, query string, or URL prefix in a domain match—these are not part of the destination hostname. Partial text matches can unintentionally include unrelated domains, especially when the text is short. To troubleshoot a specific site, start with its full hostname and widen the match only if needed. A page may also contact other hosts, so loading the main page doesn’t prove every request matched.
For port matching, port means the destination port, not the inbound listening port. To match by inbound, use inboundTag. A network-type condition describes the connection type, not the app’s name. Testing a rule with only one browser page makes it hard to tell whether the port, protocol, or domain condition failed. Start with one condition, verify it, and add the others one at a time to find which requirement isn’t met.
Domain resolution strategy and data files
AsIs does not resolve the received domain for routing, so an IP rule won’t match the address that domain would resolve to. IPIfNonMatch attempts resolution when a domain destination fails to match, allowing address rules to be checked afterward. If a broad rule already matched, this later resolution may not happen. IPOnDemand allows resolution when a rule needs an address. These options control routing, not how a browser looks up domains.
Address conditions can use a single IP or CIDR range, or a category supported by the core’s data files, such as geoip:private. Domain categories such as geosite:cn depend on the relevant file being present, the category being defined, and the core reading the expected path. Before using a category, verify the rule with a specific domain or network range. Otherwise, data-loading and rule-matching problems get mixed together. See updating GeoIP and GeoSite rule files.
If the core reports that a category is missing, don’t start by changing rule priority. Check which data files the process actually reads and confirm the category name. Also check whether a changed working directory caused it to load a different set of files. If the core starts but the result is wrong, test one destination that should match and one that should not. Category updates may change membership; keeping the previous match results alongside the data files is more informative than checking file timestamps alone.
Finally, test the default path with a destination that meets none of the exception conditions. Submit the request the same way and confirm it reaches the expected default outbound. If the result depends on whether the app sends a domain or an address, note that in your test record to avoid contradictory results on another device. If the app has already resolved the name, the rule may see only an address. A core can look up an address for a domain, but cannot guarantee it can recover the original domain from an arbitrary address.
dns — resolution and routing
First identify who made the query
The built-in DNS module provides resolution results to core features. Having a dns object does not automatically take over DNS for the whole device. An app may use the system resolver, perform its own encrypted DNS lookups, or leave destination resolution to the proxy. If the app resolves a name before connecting and submits an address, changing the core’s DNS servers may not affect that request. A website loading successfully also doesn’t tell you which resolver returned the address.
{
"dns": {
"servers": [
{ "address": "1.1.1.1", "port": 53 }
]
}
}
This example lists one IP-address DNS server using the standard DNS port. It does not create a local DNS listener for system settings or provide encrypted queries. Before using it for personal testing, confirm that the current network allows access to the resolver. On managed networks, use the server specified by the administrator. Start with a single resolver to make it easier to determine whether a timeout comes from server selection, the network path, or fallback behavior.
If you specify a DNS server by hostname, consider which resolver will look it up first. If resolving that hostname depends on the same connection that has not yet been established, the process may stall waiting for itself. The same dependency can affect the hostname of a remote proxy server. Record resolution of the destination separately from resolution of the server used to establish DNS or proxy connections. A destination lookup failure doesn’t necessarily mean the destination is unreachable; a server-name lookup failure can time out every destination that depends on it.
Determine whether resolution happens during matching or dialing
When routing receives a domain destination, it can use the strategy described in the previous chapter to get an address for IP-based rules. That result is used first for matching; it doesn’t guarantee that dialing will use the same address. Direct connections may resolve the domain differently depending on their own settings and core implementation. A remote proxy may receive the domain and resolve it itself. Changing routing strategy without checking outbound behavior can make it easy to mistake a change in matching for a change in the address used to connect.
To use different resolvers for different domains, supported cores can use domains on a server entry to define which names it should match first. This is not a system-wide DNS leak prevention switch. Whether other servers are queried after a failure depends on fallback settings and core behavior. First make one test domain reproducibly use a single path, then add more groups. If you use a geographic category to define a group, also confirm the local data file loads it.
When comparing DNS results, don’t change the query type and server at the same time. IPv4 and IPv6 reachability can differ across networks, and receiving an address doesn’t mean the device can connect to it. Browsers, operating systems, and cores may also cache results independently. For a fair comparison, use the same hostname, proxy inbound, and network conditions. Check the expected address family and note whether the app resolves the name locally. Different results alone don’t identify the cause.
FakeDNS requires a compatible core and connection setup. It returns a synthetic address used to restore the original association later, not the site’s real service address. If the connection doesn’t follow a path that can recognize that association, resolution may succeed while the connection fails. When troubleshooting basic DNS, rule out this layer first: verify lookup and dialing with regular DNS, then introduce synthetic addresses separately and confirm that resolution, traffic interception, and destination restoration all use the same configuration path.
At a minimum, record whether the request used a domain or an address, which outbound it matched, which side performed DNS resolution, and whether it timed out or received an error response. For a single-app issue, start with that app’s DNS settings. If all requests using a particular resolver fail, first check whether that resolver is reachable from where it is used. Don’t treat a longer list of built-in DNS servers as a fix unless you can explain each entry’s purpose, query priority, and expected fallback behavior.
Another common misdiagnosis: cached page content may still appear even after a DNS path is broken. Judge the result using a newly sent network request, and record the test time and the device’s network. To distinguish DNS failures from failures in other stages, verify how the query reaches the intended resolver, then check routing and dialing.
policy — connection policies and statistics
Connection levels are not routing priorities
The policy object assigns a set of connection parameters to a user level. Keys in levels are JSON strings, while fields that reference a level are usually numbers. Connections without an explicitly assigned level generally use level zero. Check the core and protocol field definitions to see whether a protocol can assign levels to a user or inbound; the same field isn’t necessarily valid at the same level in every protocol. Levels do not reorder routing rules or select a proxy outbound.
{
"stats": {},
"policy": {
"levels": {
"0": {
"handshake": 8,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5
}
},
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
}
}
Timeouts here are in seconds. The example is for illustration, not a recommended value for every device. handshake limits how long a relevant connection can wait to complete its handshake; connIdle determines when a connection is considered idle. An idle timeout is not a total request deadline while data is still flowing. If a page never establishes a connection, first check whether it failed during inbound negotiation, DNS resolution, or outbound dialing—not simply whether the idle timeout is too short.
uplinkOnly and downlinkOnly control waiting when only one direction of a connection remains available, for the uplink-only and downlink-only phases respectively. They don’t limit bandwidth or set a maximum time for each upload or download. Lowering these values may end a connection while it is still sending data in one direction after the other has closed. To diagnose this, check what happens after the half-close; a short webpage load or a request that finishes quickly may not reveal the problem.
| Policy field | What it tells you | What it cannot tell you |
|---|---|---|
handshake | Whether a connection is stuck during the handshake | The destination’s total response time |
connIdle | Time before disconnect after the last transfer | The lifetime of a continuously active connection |
uplinkOnly / downlinkOnly | Remaining transfer after one direction closes | Upload or download speed limits |
When connections drop at regular intervals, note what event starts the timer: connection startup, the last data transfer, or the closure of one direction. The same elapsed time may come from the app, remote server, or network—not necessarily a local policy. If increasing a field doesn’t change the disconnect time, restore it and look for a limit elsewhere. Relaxing several timeouts at once makes the real trigger harder to identify and may leave idle connections consuming local resources.
Enabling counters is not the same as reading them
In cores that support the fields shown here, top-level stats enables the statistics module, while switches in policy.system select which outbound directions to count. This does not automatically create a statistics webpage you can access. To read the values, you still need a supported client or core management interface. The example intentionally has no remote interface; you don’t need to expose management access to other devices to test a regular connection.
Counters help confirm whether traffic passed through an outbound. They are not the amount of data received by the destination or a speed test result. To investigate a zero count, check the switches, how you’re reading the values, the outbound tag, and whether traffic was generated during the test. After a client reload or instance switch, values may come from a new process. For each comparison, use the same statistics source, make one clearly defined request, and check whether that outbound’s count changed. This avoids attributing traffic from another app to your test.
To separate users using level-based statistics, check whether the protocol provides a user identifier for counting. A node label in the interface is not necessarily that field. Tags, user identifiers, and counter names are distinct layers. If you only need to know whether an outbound is being used, start with outbound counters. Add per-level statistics only if you need them and the current configuration provides a suitable identifier.
For everyday use, keep policy settings to a minimum. If your setup needs frequent changes, document only the levels and timeouts you actually use, along with the relevant client or standalone configuration file. When taking over an old configuration, check whether any connections use a level before migrating its settings. Then test a short request and a connection that resumes after being idle under the same conditions. Decide whether to keep explicit values or return to core defaults.
Complete local configuration and testing
Compare two outbounds with reachable destinations
This standalone configuration accepts SOCKS requests locally only. It requires no remote account and does not change the operating system’s proxy settings. A rule blocks a specified destination domain; other requests use the default direct outbound. The example verifies three things: the app connects to the correct listener, the core matches a rule by domain, and unmatched requests use the first outbound. To test an existing client, keep its configuration intact and use a free port, or stop the process already using the example port.
{
"log": { "loglevel": "info" },
"inbounds": [
{
"tag": "local-socks",
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": { "auth": "noauth", "udp": false }
}
],
"outbounds": [
{ "tag": "direct", "protocol": "freedom" },
{
"tag": "blocked",
"protocol": "blackhole",
"settings": { "response": { "type": "none" } }
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"inboundTag": ["local-socks"],
"domain": ["full:example.org"],
"outboundTag": "blocked"
}
]
},
"policy": {
"levels": { "0": { "connIdle": 300 } }
}
}
Save the file somewhere easy to identify; don’t overwrite a file generated by a GUI client. If you have a standalone Xray core and can run it from the current terminal, use the two commands below. The first checks that the configuration loads; it does not prove the port can be bound. The second starts the core. For a custom configuration in a GUI client, use the client’s loading method and check the core and logs it actually starts. There’s no need to start a separate process.
xray run -test -c config.json
xray run -c config.json
The filename in each command must match a file in the current directory. If the check says the file cannot be opened, verify the working directory and filename before changing configuration fields. If the check passes but startup reports that the address is in use, free that port or choose one you have confirmed is available, then update the requests below. If the core reports that the listener is ready while system proxy settings remain disabled, that’s expected: this configuration provides a listener but does not tell the operating system to route app traffic through it.
After starting the core, use a second terminal to send two requests explicitly through the local proxy. Use socks5h so the domain is sent to the proxy for resolution; otherwise, the app may resolve it to an address first and prevent the domain rule from matching. --noproxy "" prevents proxy bypass settings in the environment from routing around the specified listener. If your system has a command alias with the same name, run the actual curl executable, such as curl.exe on the relevant system.
curl --noproxy "" --proxy socks5h://127.0.0.1:10808 --max-time 15 https://example.com/
curl --noproxy "" --proxy socks5h://127.0.0.1:10808 --max-time 15 https://example.org/
If your network can reach these example sites, the first request should use the direct outbound. The second should match the block outbound and may fail before a connection is established or during security negotiation. Don’t rely on a single fixed error message to determine the result. If the network cannot reach the sites, the direct request will fail too. Use a non-sensitive destination you know is accessible, and make sure the full hostname in the rule matches the hostname in the command.
If both requests fail, first check whether the first one can get past the inbound. If the terminal can’t connect to the proxy, check the local address, port, and process. If it connects to the proxy but can’t reach the destination, use the logs to check outbound dialing. If both succeed, confirm which file is actually loaded, whether the request sends a domain or address, and whether the inbound tag matches the rule. Don’t move the block outbound to the first position just to get the expected result; that would invalidate the comparison.
Separate the experiment from client behavior
You can also temporarily remove the blocking rule, restart the core, and retry only the second request. If it then works, the original failure was related to the rule, not a destination that was always unreachable. Don’t change the port or app at the same time, or you won’t be able to attribute the result to the rule alone. Record the command, selected outbound, and result, then stop the standalone process, free the test port, and restore the client configuration you used before.
This example does not test UDP, system proxy coverage, remote protocol settings, or mobile traffic interception. To test a GUI client, follow the connection test in Getting Started. Use this minimal example to reproduce a question about a specific field. If you already have a working configuration, make changes incrementally in a copy. Rerun both comparison requests after each addition so you can identify which change affected the result.
After a successful test, record reproducible conditions rather than just “it works.” Specify the inbound, a hostname that should work, one that should be blocked, and the expected outbound for unmatched requests. Repeat the same tests after a client update or configuration change. If the example port is in use before a retest, choose another one and record it; don’t use a live service port for a blocking experiment.
Layered troubleshooting and rollback
Separate subscription, startup, and individual request issues
A subscription update downloads node details to the client; it does not mean the core has already used them to connect. If the update button reports a timeout or certificate error, distinguish a failed subscription request from an unusable existing node. Check how the client accesses the subscription and verify the local system time. If an existing node still works, don’t immediately delete the configuration and import it again. For subscription issues, see troubleshooting subscription update failures. This chapter starts with failures after a configuration has been selected.
If the core won’t start, start with the first clear cause in the latest startup error. For syntax or field-type errors, check brackets, commas, and field placement. For rule-loading errors, first check the referenced data files and category names. For a bind error, check for a listener conflict or an address that doesn’t belong to the device. Later messages may be consequences of the first failure; fixing the source one issue at a time is more effective than changing the network and configuration together.
If the core starts but an app can’t connect, test the listener with a request that explicitly uses the proxy. If that works but a regular browser doesn’t, check whether the browser uses the system proxy or has its own proxy overrides or exceptions. If it also fails, compare the listener and logs over the same time period. No request in the logs doesn’t necessarily mean the app didn’t connect; the log level may not record that event. Consider startup details, the request error, and destination behavior together.
{
"log": {
"loglevel": "info"
}
}
If you need to inspect a specific connection, temporarily increase the log detail level. Merge this into the existing logging object instead of replacing other log settings. If the client manages the core, change its logging setting first. Reproduce the issue once, then restore the original level. Logs may contain destination domains, addresses, device paths, or server details. Before sharing them, remove unrelated records while keeping the field names, failure stage, and a few relevant surrounding lines.
Rule mismatches, outbound failures, and recovery
If the connection works but traffic appears to be routed incorrectly, start with a reproducible request. Record its inbound, whether it sent a domain or address, whether a broad rule matched first, and which outbound was selected. A mismatched inbound tag or a domain resolved by the app before the request can prevent a rule from matching. If the logs confirm the correct outbound was selected, stop changing match conditions and check that outbound’s server connection, protocol settings, and destination response.
If only a few domains fail, compare a domain request with an address request through the same inbound. But don’t infer that the website works just because its URL loads when replaced with an IP; that changes hostname and certificate behavior too. Check whether resolution returns the expected address, whether the rule matches the input the app actually sends, and whether the destination connection works while preserving the correct hostname. For a whole category of domains, check category data and DNS groups rather than adding a separate rule for every site.
Rollback should restore the last configuration file or GUI settings that actually worked—not just undo the last line in an editor. If rules depend on external data, make sure the restored file is compatible with the current data. If the client has switched cores, confirm the current core can still read the restored fields. Restart and verify the local listener, retry the original comparison request, then restore your usual way of connecting. If the original result doesn’t return, check whether the configuration is coming from the same source as before.
If desktop works but Android doesn’t, importing the same node successfully does not mean both devices behave the same way. Compare the core, client routing mode, connection method, and DNS settings on each device to find the differences. When syncing, prioritize connection details and configure local behavior again on the target device. See syncing configurations across devices, and record migration issues separately from one-off connection failures.
After troubleshooting, keep only the changes that explain the result. Check that temporary test rules, increased log detail, and LAN listeners have been restored. Confirm the default outbound is still correct and retry the request that originally failed. If the issue is gone but the cause is still unclear, record it as recovered, not diagnosed. If it returns, reproduce it from the original conditions you recorded; don’t turn repeated restarts into a long-term fix just because one restart helped once.