• 请不要在回答技术问题时复制粘贴 AI 生成的内容
mytry
V2EX  ›  程序员

分享一个 AJAX 跨域代理 API

  •  
  •   mytry · Jan 28, 2019 · 2306 views
    This topic created in 2810 days ago, the information mentioned may be changed or developed.

    在 codesandbox.io 上用 nodejs 撸了个简单的代理:

    https://3qj09kl3vp.sse.codesandbox.io/__url__
    

    例如:

    https://3qj09kl3vp.sse.codesandbox.io/https://www.google.com/

    支持头部代理、流传输、CROS:

    url = 'https://3qj09kl3vp.sse.codesandbox.io/'
    res = await fetch(url + 'https://www.google.com/')
    await res.text()
    

    由于是免费的,可能速度比较慢~

    1 replies  •  2019-01-28 14:08:05 +08:00
    rekulas
        1
    rekulas  
       Jan 28, 2019
    估计 codesandbox 已被列入 gfw 待监测名单了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3167 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:27 · PVG 21:27 · LAX 06:27 · JFK 09:27
    ♥ Do have faith in what you're doing.