mac命令行配置代理服务器

When you configure a proxy server on your Mac, applications will send their network traffic through the proxy server before going to their destination. This may be required by your employer to bypass a firewall, or you may want to use a proxy to bypass geoblocking and access websites that aren’t available in your country.

在Mac上配置代理服务器时,应用程序将在到达目的地之前通过代理服务器发送网络流量。 您的雇主可能需要绕过防火墙,或者您可能想使用代理绕过地理封锁并访问您所在国家/地区不可用的网站。

The proxy server you set here will be used by Apple Safari, Google Chrome, and other applications that respect your system proxy settings. Some applications, including Mozilla Firefox, can have their own custom proxy settings independent from your system settings.

您在此处设置的代理服务器将由Apple Safari,Google Chrome和其他尊重系统代理设置的应用程序使用。 某些应用程序(包括Mozilla Firefox)可以具有独立于您的系统设置的自己的自定义代理设置。

Open the System Preferences application by clicking on it in your Dock, or going to the Apple menu > System Preferences. Click the “Network” icon.

通过在Dock中单击它来打开“系统偏好设置”应用程序,或进入Apple菜单>“系统偏好设置”。 点击“网络”图标。

Select the network connection you use in the list. For example, if you want to configure the proxies used while connected to Wi-Fi networks, select “Wi-Fi”. If you want to configure the proxies used while connected to wired networks, click “Ethernet”.

在列表中选择您使用的网络连接。 例如,如果要配置连接到Wi-Fi网络时使用的代理,请选择“ Wi-Fi”。 如果要配置连接到有线网络时使用的代理,请单击“以太网”。

Click the “Advanced” button at the bottom right corner of the Network window.

单击“网络”窗口右下角的“高级”按钮。

Select the “Proxies” tab. You’ll need to configure a proxy by enabling one or more of the protocol checkboxes here.

选择“代理”标签。 您需要通过在此处启用一个或多个协议复选框来配置代理。

To have your Mac detect whether a proxy is necessary and automatically configure the proxy settings, enable the “Auto Proxy Discover” checkbox. Your Mac will use the Web Proxy Auto Discover protocol, or WPAD, to automatically detect whether a proxy is necessary. This setting may be used on business or school networks, for example.

要让Mac检测是否需要代理并自动配置代理设置,请启用“自动代理发现”复选框。 您的Mac将使用Web代理自动发现协议或WPAD来自动检测是否需要代理。 例如,此设置可用于企业或学校网络。

Even after enabling this option, your Mac will only use a proxy if one is detected using WPAD. If you never want your Mac to use a proxy, even if one is detected with WPAD, leave this box unchecked.

即使启用此选项,Mac也仅在使用WPAD检测到代理时才使用代理。 如果您不希望Mac使用代理,即使使用WPAD检测到了代理,也请不要选中此框。

To use an automatic proxy configuration script, also known as a .PAC file, enable the “Automatic Proxy Configuration” checkbox. Enter the address of the script in the URL box. Your network administrator or proxy provider will provide you with the address to the proxy configuration script, if you need one.

要使用自动代理配置脚本(也称为.PAC文件),请启用“自动代理配置”复选框。 在“ URL”框中输入脚本的地址。 如果需要,您的网络管理员或代理提供商将为您提供代理配置脚本的地址。

If you don’t need to use an automatic proxy configuration script to configure your proxy settings, leave this box unchecked.

如果您不需要使用自动代理配置脚本来配置代理设置,请取消选中此框。

To manually configure a proxy, you’ll need to enable one or more of the “Web Proxy (HTTP)”, “Secure Web Proxy (HTTPS)”, “FTP Proxy”, “SOCKS Proxy”, “Streaming Proxy (RTSP)”, and “Gopher Proxy” checkboxes. Enter the address and port number of the proxy for each option you enable. If you were provided with a username and password for the proxy server, enable the “Proxy server requires password” option and enter the username and password.

要手动配置代理,您需要启用一个或多个“ Web代理(HTTP)”,“安全Web代理(HTTPS)”,“ FTP代理”,“ SOCKS代理”,“流代理(RTSP)” ”和“ Gopher代理”复选框。 输入您启用的每个选项的代理服务器的地址和端口号。 如果为您提供了代理服务器的用户名和密码,请启用“代理服务器需要密码”选项,然后输入用户名和密码。

For example, let’s say you want to configure a proxy that’s used for HTTP, HTTPS, and FTP connections. You’d check the “Web Proxy (HTTP)”, “Secure Web Proxy (HTTPS)”, and “FTP Proxy” boxes. After checking each, you’d enter the address and port of the proxy server into the right pane. If you want to use the same proxy server for all three, you’d enter the same address three times. if you were provided with different proxy server addresses for different protocols, you’d enter different proxy server addresses for these connections.

例如,假设您要配置用于HTTP,HTTPS和FTP连接的代理。 您需要选中“ Web代理(HTTP)”,“安全Web代理(HTTPS)”和“ FTP代理”框。 选中每个复选框后,将在右窗格中输入代理服务器的地址和端口。 如果要对所有三个服务器使用相同的代理服务器,则需要输入三个相同的地址。 如果为不同的协议提供了不同的代理服务器地址,则需要为这些连接输入不同的代理服务器地址。

If you don’t want to manually configure a proxy, ensure all these boxes are unchecked.

如果您不想手动配置代理,请确保所有这些框都未选中。

The remaining settings allow you to bypass the proxy server when connecting to specific addresses and domains you configure.

其余设置可让您在连接到您配置的特定地址和域时绕过代理服务器。

The “Exclude simple hostnames” checkbox allows you to bypass the proxy for all “simple hostnames”. These are often used on local networks and intranets. For example, a network might have a local website at “portal” or a local file server at “fileserver”. In other words, users may have to plug “http://portal/” or “https://fileserver/” into their address bar to access these systems. This type of hostname only works on a local network. By checking this box, you can bypass the proxy for all simple hostnames on networks you connect to.

“排除简单主机名”复选框可让您绕过所有“简单主机名”的代理。 这些通常用于本地网络和Intranet。 例如,网络可能在“门户”上有一个本地网站,或在“文件服务器”上有一个本地文件服务器。 换句话说,用户可能必须将“ http:// portal /”或“ https:// fileserver /”插入其地址栏中才能访问这些系统。 这种类型的主机名仅在本地网络上有效。 通过选中此框,您可以绕过所连接网络上所有简单主机名的代理。

The “Bypass proxy settings for these Hosts & Domains” box contains a list of host names, domain names, and IP address ranges that won’t be accessed through the proxy. For example, it contains “*.local” by default. The “*” here is a wildcard and matches anything. This means anything that ends in .local, including server.local, database.local, and anything.local, will be accessed directly without going through the proxy.

“这些主机和域的绕过代理设置”框包含将无法通过代理访问的主机名,域名和IP地址范围的列表。 例如,默认情况下它包含“ * .local”。 这里的“ *”是通配符,可以匹配任何内容。 这意味着以.local结尾的任何内容(包括server.local,database.local和any.local)都将直接访问,而无需通过代理。

To add your own domain names and addresses, just separate each with a comma and a space. For example, to tell your Mac to access howtogeek.com without going through the proxy, you’d change the line to:

要添加您自己的域名和地址,只需用逗号和空格隔开。 例如,要告诉您的Mac无需通过代理即可访问howtogeek.com,请将行更改为:

*.local, 192.254/16, howtogeek.com

If you have issues connecting to FTP servers after configuring an FTP proxy, ensure the “Use Passive FTP Mode (PASV)” option is enabled at the bottom of the window here. It’s enabled by default.

如果在配置FTP代理后遇到连接FTP服务器的问题,请确保在此处窗口底部启用了“使用被动FTP模式(PASV)”选项。 默认情况下启用。

Click “OK” to save your settings when you’re done. Click “Apply” at the bottom right corner of the Network settings screen and your changes will take effect.

完成后,单击“确定”以保存您的设置。 单击网络设置屏幕右下角的“应用”,您的更改将生效。

If there’s a problem with the proxy server settings—for example, if the proxy server goes down or if you entered the details incorrectly—you’ll see a network error message when using applications like Safari and Google Chrome. For example, Safari will say it can’t find the server you’re trying to access, while Chrome will display a more descriptive “ERR_PROXY_CONNECTION_FAILED” error message. You’ll need to fix your proxy server settings to continue.

如果代理服务器设置存在问题(例如,代理服务器出现故障或输入错误信息),则在使用Safari和Google Chrome等应用程序时会看到网络错误消息。 例如,Safari会说找不到您要访问的服务器,而Chrome会显示更具描述性的“ ERR_PROXY_CONNECTION_FAILED”错误消息。 您需要修复代理服务器设置才能继续。

翻译自: https://www.howtogeek.com/293444/how-to-configure-a-proxy-server-on-a-mac/

mac命令行配置代理服务器

mac命令行配置代理服务器_如何在Mac上配置代理服务器相关推荐

  1. mac 命令行打开火狐_从命令行打开多个Firefox选项卡

    mac 命令行打开火狐 Now that I work on Firefox Developer Tools, I'm really starting to learn some of the tri ...

  2. ls mac 显示最近修改日期_如何在Mac上按日期排序文件 | MOS86

    许多Mac用户按名称和类型对文件进行排序,但是按日期排序档案最有用的方法之一就是.Mac Finder可以为文件,文档,应用程序和文件夹提供各种不同的基于日期的排序选项,并且它们通常在Finder列表 ...

  3. 如何在mac终端运行python程序_如何在mac上的终端上运行python?

    First, the lesson said to simply type, python, into terminal to start coding in python (I don't know ...

  4. mac安装ios应用程序_如何在Mac上安装应用程序:您需要知道的一切

    mac安装ios应用程序 If you're switching to macOS from Windows, you might be confused about installing softw ...

  5. flac3d命令流实例大全_如何在Linux上使用xargs命令

    大家好,我是良许. 在使用 Linux 时,你是否遇到过需要将一些命令串在一起,但是其中一个命令不接受管道输入的情况呢?在这种情况下,我们就可以使用 xargs 命令.xargs 可以将一个命令的输出 ...

  6. mac按文件名查找文件_如何在Mac上查找和删除大文件

    mac按文件名查找文件 Freeing up disk space on a full hard drive can be difficult, especially when it's full o ...

  7. mac app图标简单制作_如何在Mac中更改App图标

    mac app图标简单制作 Sometimes, apps icon change but we like the older icon. Thankfully, it's very easy to ...

  8. mac身份不明的开发者_如何在Mac上从“身份不明的开发人员”打开应用

    mac身份不明的开发者 macOS has a feature called "Gatekeeper" designed to lock down your Mac, forcin ...

  9. mac 备份文件 太大 时间机器_如何在Mac OS X中设置时间机器备份 | MOS86

    Time Machine是内置于OS X中的简单的Mac备份解决方案,可以自动持续备份文件,应用程序和操作系统本身.时间机器不仅使Mac保持频繁的自动备份变得非常容易,而且在出现故障的情况下还原备份, ...

最新文章

  1. java static 作用详解
  2. ssh 安全远程管理
  3. 12 条用于 Linux 的 MySQL/MariaDB 安全最佳实践
  4. python中module_Python中的模块(Module)
  5. 【Nutch2.2.1基础教程之2.1】集成Nutch/Hbase/Solr构建搜索引擎之一:安装及运行【单机环境】...
  6. Android源码解析--SwipeMenuListView仿QQ聊天左滑
  7. SQL Server2008 用编写脚本自动生成的Sql语言出现 “列名显示无效 ”错误
  8. java连接ftp一直阻塞
  9. 计算机主机显卡装在哪,电脑显卡在主板上的哪个位置?怎么查看显卡的信息和更新驱动程序?...
  10. 了解与MDIO/MDC接口相关的22号、45号条款
  11. 9.9的阿里巴巴编码规范考试竟如此简单?搜集试题分享!让我们一起守护开发规范!
  12. 计算机的文件打开记录怎么删,怎样删除最近使用的文档记录,电脑文档文件怎么删除...
  13. sql compact 转mysql_如何将数据导入到 SQL Server Compact Edition 数据库中(五)
  14. Win10突然卡死的原因调查(转自yzhang)
  15. UVa1601万圣节后的早晨
  16. 设置网页默认为360浏览器极速模式打开
  17. java不能连接mysql_java无法连接数据库问题(急)
  18. vue实现答题卡页面
  19. selenium 警告框处理
  20. 毕设题目:Matlab车道线检测

热门文章

  1. 泛洪类python脚本
  2. c 语言趣味入门,Cc++趣味程序百例(献给CC++初学者).doc
  3. Linux、Python、计算机网络中的常见知识点
  4. XP未授予用户在此计算机的请求登录类型,WinXP提示未授予用户在此计算机上的请求登录类型...
  5. qnap自带有mysql吗_QNAP简单安装Nextcloud/Owncloud
  6. linux安装指南,ttyLinux安装完整指南
  7. html模拟点击某个键盘按钮,【Chrome-crx】键盘模拟鼠标点击网页按钮
  8. 监控线上服务器运行情况脚本
  9. 2011年终总结:为了娜娜的微笑
  10. 利用公网IP实现外网访问内网http服务器