mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
trtanslated
This commit is contained in:
parent
592436d760
commit
c383d46d6e
@ -1,144 +0,0 @@
|
||||
[#]: subject: "How to know if You are Behind a Proxy Server?"
|
||||
[#]: via: "https://itsfoss.com/check-proxy-server/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to know if You are Behind a Proxy Server?
|
||||
======
|
||||
|
||||
**What is a proxy?**
|
||||
|
||||
A proxy is a server or software application that acts as an intermediary between a client and another server. It serves as a gateway between the client and the internet and allows users to access online resources while keeping their identity, location, and other personal information hidden.
|
||||
|
||||
Proxies are often used to enhance security, privacy, and add filters/firewall to your network.
|
||||
|
||||
There are several types of proxies like HTTP Proxy, SOCKS Proxy, Transparent Proxy, etc.
|
||||
|
||||
Unless you are behind a transparent proxy, it is effortless to check. Here, I shall discuss methods to detect both the transparent proxy and the usual proxies in use.
|
||||
|
||||
### How to check if you are behind a Transparent proxy
|
||||
|
||||
While each type of proxy has its features and functionalities, if it's a transparent proxy, you won't be able to detect it on the client's PC. This is because the transparent proxy operates silently in the background, intercepting all traffic without modifying it.
|
||||
|
||||
Occasionally, it could be your internet service provider and the Content Delivery Networks that use these to cache a copy of a resource to save bandwidth on their end or just to monitor/filter the network.
|
||||
|
||||
There are several ways to check if you are behind a transparent proxy:
|
||||
|
||||
- **The IP address obtained through some online IP detect/check websites may not match the IP address of your computer or device.** Because the proxy server is intercepting your traffic and sending it out with its IP address.
|
||||
- **Check your network settings to see if there is a proxy server configured.**
|
||||
- **Take the help of some online Proxy detection tools.**
|
||||
- **Connect to a server that you know does not exist.** If the error displayed on the webpage looks different from usual, you might be behind a proxy.
|
||||
|
||||
Whether you like it or not, you can always bypass the transparent proxy using a [VPN service][1].
|
||||
|
||||
### How to check if you are behind a proxy on Ubuntu
|
||||
|
||||
Ubuntu, or any other Linux distribution, offers several ways to check this. Here, Ubuntu 22.10 running GNOME is used for the purpose.
|
||||
|
||||
#### Using GNOME Settings
|
||||
|
||||
This is the straightforward GUI way. Open the GNOME settings and go to the Networks tab and press the gear icon, adjacent to it.
|
||||
|
||||
![Select the gear icon adjacent to the Network proxy section][2]
|
||||
|
||||
It should be **off by default**.
|
||||
|
||||
If you are behind a proxy, you can get a different status here. Inside the proxy settings, you can see that, I am using a proxy here (manually configured).
|
||||
|
||||
![Proxy details in GNOME Settings][3]
|
||||
|
||||
The same status of proxies can be changed using the gsettings command in GNOME DE.
|
||||
|
||||
```
|
||||
gsettings set org.gnome.system.proxy mode 'none'
|
||||
```
|
||||
|
||||
You can replace the `none` with `auto` or `manual`. Remember that, this setting is temporary and only for the current user.
|
||||
|
||||
#### Using the Command line
|
||||
|
||||
You can get the status of proxies through the command line in various ways.
|
||||
|
||||
**Getting the status of the proxy by listing the associated environment variables**
|
||||
|
||||
Open a terminal and run either of the following commands:
|
||||
|
||||
```
|
||||
env | grep -i proxy
|
||||
```
|
||||
|
||||
```
|
||||
cat /etc/environment | grep -i proxy
|
||||
```
|
||||
|
||||
```
|
||||
set | grep -i proxy
|
||||
```
|
||||
|
||||
![Using set command to check Proxy variables][4]
|
||||
|
||||
An empty output means that, there are no proxies configured. Else, it will print the relevant ENV variables.
|
||||
|
||||
🚧
|
||||
|
||||
Note that this will work if you set the proxy as an environment variable.
|
||||
|
||||
Alternatively, you can echo each proxy variable to check whether that particular one is set.
|
||||
|
||||
Here's what you can type in the terminal:
|
||||
|
||||
```
|
||||
echo $http_proxy
|
||||
```
|
||||
|
||||
**Check using nmcli command**
|
||||
|
||||
Open a terminal and issue the command:
|
||||
|
||||
```
|
||||
nmcli connection show
|
||||
```
|
||||
|
||||
![List all the connections using nmcli command][5]
|
||||
|
||||
This will list your connections and the associated UUID numbers. Note the UUID number of the connection, you want to check. Then use the command:
|
||||
|
||||
```
|
||||
nmcli connection show <UUID or name> | grep -i "proxy"
|
||||
```
|
||||
|
||||
This will list the variables, where, you can note the proxy server and the port.
|
||||
|
||||
![Proxy details using nmcli command][6]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
I hope this guide helps you know if you are behind a proxy.
|
||||
|
||||
I must mention that **not all proxy configurations are malicious.**
|
||||
|
||||
However, it is important to know whether your system has a proxy configured or not.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/check-proxy-server/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed/
|
||||
[1]: https://itsfoss.com/best-vpn-linux/
|
||||
[2]: https://itsfoss.com/content/images/2023/02/select-the-gear-icon-adjacent-to-proxy.png
|
||||
[3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png
|
||||
[4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png
|
||||
[5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png
|
||||
[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png
|
@ -0,0 +1,145 @@
|
||||
[#]: subject: "How to know if You are Behind a Proxy Server?"
|
||||
[#]: via: "https://itsfoss.com/check-proxy-server/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何知道你是否使用了代理服务器?
|
||||
======
|
||||
|
||||
**什么是代理?**
|
||||
|
||||
代理是充当客户端和另一台服务器之间的中介的服务器或软件应用。它充当客户端和互联网之间的网关,允许用户访问在线资源,同时隐藏他们的身份、位置和其他个人信息。
|
||||
|
||||
代理通常用于增强安全性和隐私,并为你的网络添加过滤器/防火墙。
|
||||
|
||||
有几种类型的代理,如 HTTP 代理、SOCKS 代理、透明代理等。
|
||||
|
||||
除非你在透明代理后面,否则检查起来毫不费力。在这里,我将讨论检测透明代理和常用代理的方法。
|
||||
|
||||
### 如何检查你是否在透明代理后面
|
||||
|
||||
虽然每种类型的代理都有其特性和功能,但如果它是透明代理,你将无法在客户端的 PC 上检测到它。这是因为透明代理在后台静默运行,拦截所有流量而不修改它。
|
||||
|
||||
有时,可能是你的互联网服务提供商和内容交付网络使用它们来缓存资源的副本以节省带宽或只是为了监视/过滤网络。
|
||||
|
||||
|
||||
有几种方法可以检查你是否在透明代理后面:
|
||||
|
||||
- **通过某些在线 IP 检测/检查网站获得的 IP 地址可能与你的计算机或设备的 IP 地址不匹配**。因为代理服务器正在拦截你的流量并将其与 IP 地址一起发送出去。
|
||||
- **检查你的网络设置以查看是否配置了代理服务器。**
|
||||
- **借助一些在线代理检测工具。**
|
||||
- **连接到你知道不存在的服务器。**如果网页上显示的错误看起来与平时不同,你可能使用了代理。
|
||||
|
||||
无论你喜欢与否,你始终可以使用 [VPN 服务][1]绕过透明代理。
|
||||
|
||||
### 如何检查你是否在 Ubuntu 上使用代理
|
||||
|
||||
Ubuntu 或任何其他 Linux 发行版提供了多种检查方法。此处使用运行 GNOME 的 Ubuntu 22.10。
|
||||
|
||||
#### 使用 GNOME 设置
|
||||
|
||||
这是直接的 GUI 方式。打开 GNOME 设置并转到“网络”选项卡,然后按旁边的齿轮图标。
|
||||
|
||||
![Select the gear icon adjacent to the Network proxy section][2]
|
||||
|
||||
它应该**默认关闭**。
|
||||
|
||||
如果你在代理后面,你可以在这里获得不同的状态。在代理设置中,你可以看到,我在这里使用了代理(手动配置)。
|
||||
|
||||
![Proxy details in GNOME Settings][3]
|
||||
|
||||
可以使用 GNOME 桌面中的 gsettings 命令更改相同的代理状态。
|
||||
|
||||
```
|
||||
gsettings set org.gnome.system.proxy mode 'none'
|
||||
```
|
||||
|
||||
你可以将 `none` 替换为 `auto` 或 `manual`。请记住,此设置是临时的,仅适用于当前用户。
|
||||
|
||||
#### 使用命令行
|
||||
|
||||
你可以通过命令行以多种方式获取代理的状态。
|
||||
|
||||
**通过列出关联的环境变量获取代理的状态**
|
||||
|
||||
打开终端并运行以下任一命令:
|
||||
|
||||
```
|
||||
env | grep -i proxy
|
||||
```
|
||||
|
||||
```
|
||||
cat /etc/environment | grep -i proxy
|
||||
```
|
||||
|
||||
```
|
||||
set | grep -i proxy
|
||||
```
|
||||
|
||||
![Using set command to check Proxy variables][4]
|
||||
|
||||
空输出意味着没有配置代理。否则,它将打印相关的环境变量。
|
||||
|
||||
🚧
|
||||
|
||||
请注意,如果你将代理设置为环境变量,这将起作用。
|
||||
|
||||
或者,你可以回显每个代理变量以检查是否设置了特定的代理变量。
|
||||
|
||||
以下是你可以在终端中输入的内容:
|
||||
|
||||
```
|
||||
echo $http_proxy
|
||||
```
|
||||
|
||||
**使用 nmcli 命令检查**
|
||||
|
||||
打开终端并输入:
|
||||
|
||||
```
|
||||
nmcli connection show
|
||||
```
|
||||
|
||||
![List all the connections using nmcli command][5]
|
||||
|
||||
这将列出你的连接和关联的 UUID 编号。记下要检查的连接的 UUID 编号。然后使用命令:
|
||||
|
||||
```
|
||||
nmcli connection show <UUID or name> | grep -i "proxy"
|
||||
```
|
||||
|
||||
这将列出变量,你可以在其中记下代理服务器和端口。
|
||||
|
||||
![Proxy details using nmcli command][6]
|
||||
|
||||
### 总结
|
||||
|
||||
我希望本指南可以帮助你了解你是否在使用代理。
|
||||
|
||||
我必须提一下,**并非所有代理配置都是恶意的。**
|
||||
|
||||
但是,了解你的系统是否配置了代理很重要。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/check-proxy-server/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed/
|
||||
[1]: https://itsfoss.com/best-vpn-linux/
|
||||
[2]: https://itsfoss.com/content/images/2023/02/select-the-gear-icon-adjacent-to-proxy.png
|
||||
[3]: https://itsfoss.com/content/images/2023/02/Proxy-in-GNOME-settings.png
|
||||
[4]: https://itsfoss.com/content/images/2023/02/set_grep_proxy.png
|
||||
[5]: https://itsfoss.com/content/images/2023/02/nmcli-connection-show.png
|
||||
[6]: https://itsfoss.com/content/images/2023/02/proxy-using-nmcli.png
|
Loading…
Reference in New Issue
Block a user