首页 / 帮助文档 / 在 Clash Verge 里使用 IPLight 代理

在 Clash Verge 里使用 IPLight 代理

Using IPLight Proxies in Clash Verge

四段式字段对照 · 本地配置 / Merge · 粘性会话 · 五类失败排查 · 2026-11-27 更新
Four-field mapping · local profile or Merge · sticky sessions · five failure modes · updated 2026-11-27

Clash Verge 是规则型客户端(内核 mihomo / Clash.Meta)。它本身不提供隧道,它的职责是把不同流量分给不同出站。IPLight 给你的就是其中一个出站:一个 HTTP 或 SOCKS5 端点,四个字段。

所以这里没有订阅链接可导入——IPLight 不发放 Clash 订阅格式。你要做的是把控制台生成的那一行代理信息,翻译成一段 proxies 配置。这件事的核心只有一个:四个字段各自落到哪个键上。弄对这一步,后面全是细节。

先把四个字段对上号

这四个值在控制台 www.iplight.net/index →「代理」→「动态手机」或「动态住宅」→「提取代理」里生成,选择地区、粘性时间和协议后点生成,把显示出来的四段信息逐一填进 Clash。

控制台里看到的Clash 里填到注意
网关域名server只写域名,不要带 http://,也不要带端口
端口port单独一个数字,不要粘在域名后面
账号username原样复制,包含 -US-、-session- 这类后缀
密码password原样复制,不要删字符
协议(生成时选的)typeHTTP 就写 http,SOCKS5 就写 socks5

最常见的错法,是把四段当成一个字符串塞进 server:mobile.iplight.net:1086:user:pass 不是地址,是四个字段。Clash 里必须拆开填,任何一段粘错位置都会表现为"节点红了但看不出原因"。

方式一:新建本地配置(最快验证能不能通)

适合只想先确认这条代理可用。路径:Clash Verge →「订阅 / Profiles」→ 右上「新建」→ 类型选 Local → 起个名字 → 把下面的内容粘进去 → 保存 → 点这张卡片启用。下面 YAML 里的账号密码是示意值,请换成你控制台生成的那一串。

mixed-port: 7897
mode: rule

proxies:
  - name: IPLight-01
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false

proxy-groups:
  - name: PROXY
    type: select
    proxies: [IPLight-01, DIRECT]

rules:
  - MATCH,PROXY

这段里有三个地方值得解释,因为它们是踩过才知道的:

不要加 tls: true。我们的 HTTP 代理是明文 HTTP,Clash 加了 tls 会去和它做 TLS 握手,结果就是节点一直红、日志里一串 handshake failure。这一条能解决掉大部分"连不上"的工单。

方式二:已有订阅,用 Merge 叠上去

直接编辑订阅那份配置不是好主意:下次更新订阅就被覆盖,"节点昨天还在今天就没了"多数是这么来的。Clash Verge 在 Profiles 页有一个独立的 Merge 卡片,它在每次加载订阅之后把这段内容合并进去,不写回订阅文件。

prepend-proxies:
  - name: IPLight-01
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false

append-proxy-groups:
  - name: IPLight
    type: select
    proxies: [IPLight-01, DIRECT]

要点是 prepend-proxies / append-proxy-groups 这种前缀写法:直接写 proxies: 会把订阅里的节点整段替换掉,你的机场节点就全消失了。如果你的 Merge 编辑器不认这种前缀(较老版本),退回方式一建一份独立本地配置,同样能用。

要在订阅的规则里强制某个域名走这条代理,用 prepend-rules 把规则插到最前面,因为规则是从上往下匹配的,写在 MATCH 之后等于没写:

prepend-rules:
  - DOMAIN-SUFFIX,target-site.com,IPLight

粘性会话:一条节点 = 一个会话

这一点不想明白,用起来会以为"IP 一直不变是坏了"。我们的会话参数写在账号密码里:后缀带 -session-1h 表示一小时内固定同一个出口,带 -global 表示按你账号的默认策略走。

对 Clash 来说,一条 proxies 条目就是一份固定的账号密码,也就是一个固定会话,它不会自己换。想换出口,去控制台重新生成一条(换掉会话参数),再加成一个新节点。

proxies:
  - name: IPLight-S1
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false
  - name: IPLight-S2
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h-2"
    udp: false

proxy-groups:
  - name: PROXY
    type: url-test
    url: https://ipinfo.io/json
    interval: 300
    proxies: [IPLight-S1, IPLight-S2]

url-test 按这个 URL 的延迟自动选最快的一条;fallback 只在当前节点失联时切换。两者都是按连接选,不是按请求选——所以别指望用 Clash 的分组做"每个请求换一个 IP"。采集需要多 IP 并发,正确做法是让程序按节点列表自己轮换,Clash 只负责把连接送出去。

验证走没走代理

  1. 开一个无痕窗口,访问 ipinfo.io 或 ip.sb,看国家 / 城市是否与生成时选的一致。
  2. 不一致时先看「代理」页当前选中的是不是你的节点,再看「规则」页这次请求命中了哪一条。
  3. 如果命中的是 DIRECT,说明 MATCH 没落到 PROXY,或者订阅里的直连规则排在你的规则前面。

浏览器有连接复用和 DNS 缓存,同一个标签页反复刷新很可能一直走旧连接。改完配置先用无痕窗口测一次,再下结论。

五类失败,按现象查

现象多半是怎么处理
节点一直红 / 日志 handshake 失败加了 tls: true删掉这一行,我们是明文 HTTP
节点红 / 连接被拒type 与生成时选的协议不一致,或端口粘错按生成时选的协议对齐 type,端口单独填
延迟测试显示 -1,但网页能开Clash 用它自己的测速 URL 探活,节点访问不了那个地址把测速 URL 换成 https://ipinfo.io/json 或你真正要打的目标站
能上网但目标站看不到换 IP规则命中了 DIRECT,或浏览器复用了旧连接看「规则」页命中项;换无痕窗口再测
部分 App 连不上,浏览器正常该应用不走系统代理在「设置」里开 TUN 模式(虚拟网卡接管全部流量)
更新订阅后节点消失直接改了订阅配置改用 Merge 的 prepend-proxies

两条安全提醒

还有一条不算是坑但常被问:Clash Verge 是桌面端(Windows / macOS / Linux)。手机上用 Clash Meta for Android 或 Shadowrocket,填法完全一样——类型、服务器、端口、用户名、密码,五个框。

常见问题

能直接导入你们的 Clash 订阅链接吗?

不能,我们不发放 Clash 订阅格式。控制台生成的四段式信息按上面的字段表填进 proxies 就可以,一条节点对应一个会话。

为什么 Clash 显示超时,Python requests 走同一个代理却是通的?

Clash 是用它自己的测速 URL 去探活,探不通只说明节点访问不了那个地址,不代表你的业务目标不通。把测速 URL 换成 https://ipinfo.io/json,或者直接看请求日志。

一条节点能给多个人同时用吗?

技术上能连,但并发和流量都算在同一个账号上。要让不同人分别计量,就在控制台开子账号,各自生成代理。

我改了控制台的地区,Clash 里要重新配吗?

要。地区与会话参数都编码在账号密码里,相当于换了一份凭据,必须重新生成一条节点替换旧的。

Clash Verge 和 Clash for Windows 的配置通用吗?

这段 YAML 的 proxies 写法是通用的,差别在客户端的配置管理方式。Clash for Windows 已停止更新,新装建议直接用 Verge。

把 Clash 的日志(发之前记得遮掉账号密码)和目标站地址发到 support@iplight.net,我们看是节点问题还是规则问题。

先看移动代理接入文档

Clash Verge is a rule-based client built on the mihomo / Clash.Meta core. It does not give you a tunnel; its job is to send different traffic to different outbounds. An IPLight proxy is exactly one of those outbounds: an HTTP or SOCKS5 endpoint described by four fields.

There is no subscription link to import — we do not publish Clash subscription files. What you do is take the proxy line your console generated and translate it into a proxies entry. The whole problem reduces to one question: which key does each of the four fields go into?

Map the four fields first

You generate these values in the console at www.iplight.net/index → Proxies → Dynamic Mobile or Dynamic Residential → Extract proxy. Pick a region, a stickiness window and a protocol, then copy each of the four values into the matching Clash field.

In your consoleIn ClashWatch out
Gateway hostnameserverHostname only — no http://, no port
PortportA bare number, not appended to the hostname
UsernameusernameCopy verbatim, including suffixes like -US- or -session-
PasswordpasswordCopy verbatim, drop nothing
Protocol (chosen at generation)typehttp for HTTP, socks5 for SOCKS5

The single most common mistake is pasting the whole four-part string into server: host:port:user:pass is not an address, it is four separate values. Clash needs them in four fields. Any one of them in the wrong box shows up as "the node is red and nothing tells me why".

Option 1: a local profile (fastest way to prove it works)

Good when you just want to confirm the proxy is alive. In Clash Verge: Profiles → New → type Local → name it → paste the YAML below → Save → click the card to activate it. The credentials in the samples are placeholders — replace them with the ones from your console.

mixed-port: 7897
mode: rule

proxies:
  - name: IPLight-01
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false

proxy-groups:
  - name: PROXY
    type: select
    proxies: [IPLight-01, DIRECT]

rules:
  - MATCH,PROXY

Three lines in there deserve an explanation, because each one is something you only learn by hitting it:

Do not add tls: true. Our HTTP proxy is plain HTTP. With tls enabled Clash attempts a TLS handshake against it, and you get a permanently red node plus a wall of handshake failure lines. This one line resolves most "it will not connect" tickets.

Option 2: you already have a subscription — layer it with Merge

Editing the subscription file itself is a bad idea: the next subscription update overwrites it, which is where "the node was there yesterday and gone today" usually comes from. Clash Verge has a separate Merge profile that is applied after the subscription loads and is never written back into it.

prepend-proxies:
  - name: IPLight-01
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false

append-proxy-groups:
  - name: IPLight
    type: select
    proxies: [IPLight-01, DIRECT]

The prepend- / append- prefixes matter: writing a plain proxies: block replaces the subscription nodes wholesale and your existing servers disappear. If your Merge editor does not recognise the prefixes (older builds), fall back to Option 1 and keep a separate local profile instead.

To force one domain through this proxy regardless of the subscription rules, use prepend-rules — rules are evaluated top to bottom, so anything after MATCH never fires:

prepend-rules:
  - DOMAIN-SUFFIX,target-site.com,IPLight

Sticky sessions: one node is one session

Miss this and you will conclude the IP is stuck because something is broken. Session parameters live inside the username and password: a suffix such as -session-1h pins the same exit for one hour, while -global follows your account default.

To Clash, one proxies entry is one fixed credential pair, therefore one fixed session. It will never rotate on its own. To get a different exit, generate a new proxy in the console (which changes the session parameter) and add it as an extra node.

proxies:
  - name: IPLight-S1
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h"
    udp: false
  - name: IPLight-S2
    type: http
    server: mobile.iplight.net
    port: 1086
    username: "10001-abc123"
    password: "pass456-US-session-1h-2"
    udp: false

proxy-groups:
  - name: PROXY
    type: url-test
    url: https://ipinfo.io/json
    interval: 300
    proxies: [IPLight-S1, IPLight-S2]

url-test picks whichever node answers that URL fastest; fallback only switches when the current one goes down. Both choose per connection, not per request — so Clash groups are not a way to get "a new IP for every request". High-concurrency scraping needs your code to rotate across the node list itself; Clash only moves the packets.

Verify the traffic actually goes through

  1. Open an incognito window and visit ipinfo.io or ip.sb. The country and city should match what you selected when generating the proxy.
  2. If they do not, check which node is selected on the Proxies page, then check which rule this request matched on the Rules page.
  3. If it matched DIRECT, your MATCH is not reaching PROXY, or a direct rule in the subscription sits above yours.

Browsers reuse connections and cache DNS. Reloading the same tab repeatedly can keep the old connection alive; test in a fresh incognito window before drawing conclusions.

Five failure modes, by symptom

SymptomUsuallyFix
Node stays red, log shows handshake failuretls: true was addedRemove it — our proxy is plain HTTP
Node red, connection refusedtype does not match the protocol you generated, or the port is malformedAlign type with the generated protocol; keep the port separate
Latency shows -1 but pages loadClash probes its own test URL, which the node cannot reachChange the test URL to https://ipinfo.io/json, or to the site you actually target
Works, but the target site sees no IP changeThe rule matched DIRECT, or the browser reused a connectionCheck the matched rule; retest in incognito
Some apps fail, browser is fineThe app ignores the system proxyEnable TUN mode in Settings (virtual adapter captures all traffic)
Nodes vanish after a subscription updateThe subscription profile was edited directlyMove the block into Merge with prepend-proxies

Two security notes

One question that comes up constantly but is not really a pitfall: Clash Verge is desktop-only (Windows / macOS / Linux). On phones use Clash Meta for Android or Shadowrocket — the fields are identical: type, server, port, username, password.

FAQ

Can I import an IPLight Clash subscription link?

No — we do not publish Clash subscription files. Paste the four-field credentials from your console into the proxies block as shown above; one node maps to one session.

Why does Clash show a timeout while Python requests works through the same proxy?

Clash probes its own test URL. A failure there only means the node cannot reach that particular address, not that your target is unreachable. Point the test URL at https://ipinfo.io/json, or check the request log.

Can several people share one node?

It will connect, but concurrency and bandwidth all bill to the same account. For separate metering, create sub-accounts in the console and generate a proxy for each.

I changed the region in the console — do I need to reconfigure Clash?

Yes. Region and session parameters are encoded in the credentials, so a new proxy means new credentials and a new node replacing the old one.

Is this config compatible with Clash for Windows?

The proxies YAML is identical; only profile management differs. Clash for Windows is no longer maintained, so new installs should use Verge.

Send the Clash log (mask the credentials first) and the target site to support@iplight.net and we will tell you whether it is the node or the rule set.

Read the mobile proxy guide

更多文档 IPLight 帮助文档中心 · 开发者文档 · support@iplight.net · 返回官网