Intern_proxy_server

所属分类:代理服务器
开发工具:Vue
文件大小:0KB
下载次数:0
上传日期:2023-10-26 22:53:57
上 传 者sh-1993
说明:  对于每个浏览器,将某些特定站点列入白名单,仅允许列入白名单的站点,并阻止所有其他站点。对于某些网站url集也不同...,
(For each browser, whitelist some specific sites, allow only whitelisted site and block all other sites. also for some site url set different site url. like if user search youtub.com but browser should open wikipedia.org.)

文件列表:
OneDrive/ (0, 2023-10-28)
OneDrive/Documents/ (0, 2023-10-28)
OneDrive/Documents/ (0, 2023-10-28)
(0, 2023-10-28)
404page/ (0, 2023-10-28)
404page/index.css (727, 2023-10-28)
404page/index.html (678, 2023-10-28)
certificats/ (0, 2023-10-28)
certificats/a2.pem (1122, 2023-10-28)
certificats/a3.pem (1126, 2023-10-28)
certificats/a4.pem (1122, 2023-10-28)
command (95, 2023-10-28)
derfile/ (0, 2023-10-28)
derfile/a2.der (788, 2023-10-28)
derfile/a3.der (788, 2023-10-28)
derfile/a4.der (788, 2023-10-28)
fetchdata.txt (75569, 2023-10-28)
index1_try1.js (913, 2023-10-28)
index2_try2.js (1926, 2023-10-28)
index3_try3.js (2845, 2023-10-28)
index4_try4.js (1635, 2023-10-28)
index5_try5.js (915, 2023-10-28)
index6_try6.js (4123, 2023-10-28)
index7_final.js (2788, 2023-10-28)
keys/ (0, 2023-10-28)
keys/a2.key (1674, 2023-10-28)
keys/a3.key (1674, 2023-10-28)
keys/a4.key (1674, 2023-10-28)
launch-chrome.js (737, 2023-10-28)
login data (560, 2023-10-28)
logindta2.txt (5436, 2023-10-28)
otherdata (5561, 2023-10-28)
output.txt (6997, 2023-10-28)
package-lock.json (305970, 2023-10-28)
package.json (679, 2023-10-28)
uotput3.txt (2132, 2023-10-28)

# mockttp-proxy-demo A tiny demo, showing how to build your own scriptable HTTPS-intercepting proxy with Mockttp ## How to use this - Clone the repo. - Run `npm install` inside the repo. - Run `node index7_final.js` to start the proxy and an intercepted Chrome window. You can also run `npm start` to start the server directly, ## Some suggested rules Try replacing [the existing rule](https://github.com/sandeeppatel2001/demo_proxy_rule/blob/main/demo_rule.js) with: ```javascript // Proxy all example.com traffic through as normal, untouched: server.anyRequest().forHost("example.com").thenPassThrough(); // Make all GET requests to google.com time out: server.get("google.com").thenTimeout(); // Redirect any github requests to wikipedia.org: server .anyRequest() .forHost("github.com") .thenForwardTo("https://www.wikipedia.org"); // Intercept /api?userId=123 on any host, serve the response from a file: server .get("/api") .withQuery({ userId: 123 }) .thenFromFile(200, "/path/to/a/file"); // Forcibly close any connection if a POST request is sent: server.post().thenCloseConnection(); ``` This defines a few different rules for specific requests. Try viewing Google.com for example (it'll timeout) or visiting GitHub (it'll give you Wikipedia instead). This only works for the specific traffic that's matched. If you'd like to proxy most traffic as normal, so the internet basically works but only one or two things are changed, then: - Define your specific rules, as above - Include a `.always()` specifier on each one (e.g. `server.get("google.com").always().thenReply(200, "hi")`) - Add one last rule at the end which says: ```javascript server.anyRequest().thenPassThrough(); ``` This ensures that your specific rules always take precedence if they match, and any requests which don't match them get proxied untouched, and work as normal. ```javascript // Proxy all example.com traffic through as normal, untouched: server.anyRequest().forHost("example.com").thenPassThrough(); // Make all GET requests to google.com time out: server.get("google.com").thenTimeout();

近期下载者

相关文件


收藏者