Dream4U
V2EX  ›  Apple

Surge iOS 脚本如何通过判断不同的 UA,修改返回 body 内容?

  •  
  •   Dream4U · Aug 2, 2023 · 1461 views
    This topic created in 1039 days ago, the information mentioned may be changed or developed.

    写了一个脚本,脚本类型为 http-response ,试图通过判断 UA 来修改 body 内容,但好像 http-response 脚本并不能获取 UA? 有什么办法吗?

    var user_agent = $request.headers['User-Agent'];

    Dream4U
        1
    Dream4U  
    OP
       Aug 2, 2023 via iPhone
    知道了,Surge 用小写 user-agent
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   883 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:57 · PVG 05:57 · LAX 14:57 · JFK 17:57
    ♥ Do have faith in what you're doing.