As a web enthusiast, I often need to use domestic proxy domestic ip proxy (domestic online proxy ip) to access some of the sites being used. This situation is like being a guest at a friend's house in China, and you need to borrow their network address in order to chat with your friends in China without any obstacles. And the domestic proxy domestic ip is like a friend at home opens a door for you, you can communicate with the domestic world through this door.
Domestic proxy domestic ip
In the online world, there is something called a proxy, which is like a middleman that helps you to communicate with other computers. Domestic proxy domestic ip, is the use of domestic servers, to send requests to domestic servers, and then send domestic feedback to you. This is just like you get a friend in China to write a letter for you to the country, and then receive the feedback and then forward it to you. In this way, you can smoothly access some domestic websites that cannot be opened at home and communicate with your friends at home.
Code Example:
“`
import requests
proxies = {
"http": "http://your_ip:your_port",
"https": "https://your_ip:your_port",
}
resp = requests.get("http://www.example.com", proxies=proxies)
“`
Domestic online proxy ip
Domestic online proxy ip is like renting a small apartment in China and then setting up a mailbox inside the apartment, any mail sent to this mailbox will be forwarded to you. With a domestic online proxy ip, you can rent a public ip on a server in China, and then access domestic websites through that ip address, just like you set up a mailbox in China, and any mail sent to this mailbox will be forwarded to you.
Code Example:
“`
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
proxy = Proxy()
proxy.proxy_type = ProxyType.MANUAL
proxy.http_proxy = "ip_addr:port"
proxy.ssl_proxy = "ip_addr:port"
capabilities = webdriver.DesiredCapabilities.CHROME
proxy.add_to_capabilities(capabilities)
driver = webdriver.Chrome(desired_capabilities=capabilities)
“`
In a word, both domestic proxy domestic ip and domestic online proxy ip are designed to make it easier for us to visit domestic websites and communicate with domestic friends. Of course, the use of proxy ip also need to pay attention to some security issues, do not feel free to use an unknown proxy ip, so as not to cause some unexpected problems. I hope that when you use proxy ip, all of you can be unobstructed, enjoyable to play.