Skip to content

Commit

Permalink
Adding handling for proxy connections and redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-kevin committed Jun 14, 2024
1 parent 3fb6397 commit 772aa81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/malwarejail/env/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function run_data_function(url, data) {
try {
if (is_domain_geo(url)) {
data(domain_geo_response);
} else if (url.indexOf("proxy") !== -1) {
data("http://example.com/");
} else {
data();
}
Expand Down
4 changes: 4 additions & 0 deletions tools/malwarejail/env/web/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,10 @@ fetch = function (url) {
if (is_domain_geo(url)) {
var response = new Response(JSON.stringify(domain_geo_response));
return response;
}
else if (url.indexOf("proxy") !== -1) {
var response = new Response("http://example.com/");
return response;
} else {
return new Response();
}
Expand Down

0 comments on commit 772aa81

Please sign in to comment.