Question

i want set my own web proxy in google chrome to get all the web pages from my server. I know that we can set a web proxy server from the settings but what i want is also pass parameters to the server, so instead of that : 24.33.20.87:8888 i want redirect the pages to here : 24.37.47.30:8888/cgi-bin/mgetpage?tm=567567567&send=0&murl=google.com

Do you have an idea how to do it please? Thanks in advance

Était-ce utile?

La solution

You'll have to write an extension that captures each tab and redirects it to your custom URL if it isn't already there.

You'll need to use the Tabs API. Lets say you use getCurrent to get the current tab. You can get it's url and see if document.domain is equal to your 24.37.47.30. If it is not, you can use window.location to redirect it to:

24.37.47.30:8888/cgi-bin/mgetpage?tm=567567567&send=0&murl={tab_url}

Apparently there are some Chrome extensions that already do something like this.

https://chrome.google.com/webstore/detail/odchblbgkkchnldldakeikkjfbkllaah

https://chrome.google.com/webstore/detail/lacckjdlmkdhcacjdodpjokfobckjclh

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top