📜 ⬆️ ⬇️

We are replacing the Bing search engine with the necessary one in Skype

Freedom to search from Skype! How, thanks to nginx, you can simply change the domain and google directly from the chat, not bing.



With the advent of the possibility of searching in Bing from the Skype menu , I firmly thought that this is not fair to other search engines and without fail there must be a free way to search also in other search engines! But, unfortunately, I have not yet found a ready solution to this problem.

Once, setting up nginx on a local server at home and talking on Skype, I decided to correct this injustice. The following will allow you to redirect all requests to bing domains for a specific domain, in my case - Google, without being embedded in the Skype code, but only by setting up dns (etc / hosts) and nginx.
')
1. If you have a DNS server on your local network, it is better to write the corresponding records into it, and I just correct the local etc / hosts file - under Unix or % HOMEDRIVE% \ Windows \ System32 \ drivers \ etc \ hosts - under Windows; add the line:

192.168.7.5 www.bing.com 

192.168.7.5 - the IP address of the local server where nginx is installed.

2. Add the server to the nginx configuration file:

 server { listen 80; server_name www.bing.com; return https://www.google.com/search?q=$arg_q; } 

Instead of $ arg_q nginx substitutes the corresponding variable, so if you need to search on Wikipedia, it is enough to change the line to:

  return https://ru.wikipedia.org/w/?search=$arg_q; 

Restarting daemon:

 service nginx reload 

So, what is happening here?

Skype, when selecting the Bing Search menu item, opens the page:

www.bing.com/search?q=++&FORM=SKYPCC&PC=SKCC


The computer on which this occurs finds the domain record we replaced and sends a request to our server 192.168.7.5. Nginx on the server processes the request and redirects to the desired URL:

www.google.com/search?q=++


Perhaps this setting will violate someone's rights and some laws, but for ourselves we have the right to set up our servers as we need, and we get the desired result without engaging in reverse engineering of Skype and do not hack anyone.

Source: https://habr.com/ru/post/272865/


All Articles