Giter VIP home page Giter VIP logo

hans000 / easy-interceptor Goto Github PK

View Code? Open in Web Editor NEW
36.0 1.0 8.0 9.67 MB

Easy Interceptor is a Chrome extension that intercepts HTTP requests in the form of XMLHttpRequest data requests

Home Page: https://github.com/hans000/easy-interceptor/wiki

License: GNU Affero General Public License v3.0

HTML 0.23% Less 3.28% TypeScript 95.76% JavaScript 0.73%
chrome-extension xmlhttprequest mock interceptor fake fetch mockfetch proxy-fetcher proxy-server proxy-xhr

easy-interceptor's Issues

It's not working!!

Dear friend,

Could you please write the instruction of how to setup this tool? I tried many times but it's not working in developr mode!

Screenshot 2023-11-22 at 01 55 22

Please advice!

区分开发环境和生产环境

最开始的时候使用的是拦截response(不能脱离服务端,需要发送真实的请求),后来更新为Fake XMLHttpRequest(优势在于可以脱离服务端,可是不发送真实请求),这导致了很多情况下不能用。因此,增加一个功能来人为控制。

some fonts requests not redirected.

Hi, I tried to use this extension to redirect some requests like fonts.gstatic.com to gstatic.loli.net and fonts.googleapis.com to fonts.loli.net.

So I added the following rule.

config:

{
    "test": "fonts.gstatic.com",
    "groupId": "default",
    "response": {
        "code": 0,
        "data": [],
        "message": "success"
    }
}

code:

onRedirect((rule) => {
    const redirectUrl = new URL(rule.url);
    redirectUrl.host = 'gstatic.loli.net';
    return redirectUrl.toString();
})

Some requests are redirected as expected.

image

But some requests are not working.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.