的代理配置进入一个公司,每次使用网络都必须进行身份验证,例如:对于我使用的工具,如npm,sublime、git、Composer,如果不配置认证,是不行的。下面是我总结的一些配置方法。比如你的代理是192.168.1.11:8080npm代理配置方法格式:`npmconfigsetproxyhttp://username:password@ip:portnpmconfigsethttps-proxyhttp://username:password@ip:port`示例:npmconfigsetproxyhttp://zhangsan:123456@192.168.1.11:8080npmconfigsethttps-proxyhttp://zhangsan:123456@192.168.1.11:8080git的配置方法类似:gitconfig–globalhttp.proxyhttp://username:password@ip:portgitconfig–globalhttp.proxyhttp://username:password@ip:port例子:gitconfig–globalhttp.proxyhttp://zhangsan:123456@192.168.1.11:8080gitconfig–globalhttp.proxyhttp://zhangsan:123456@192.168.1.11:8080Sublime配置方法:先安装packageControl,如果安装不了,先下载下来,手动安装。选择Preferences->PackageSettings->PackageControl->SettingsUser并在文件中添加"http_proxy":"192.168.1.11:8080","https_proxy":"192.168.1.11:8080","proxy_password":"123456","proxy_username":"zhuangsan"如果还是不能安装插件,在上面的文件中添加:"channels":["http://127.0.0.1/channel_v3.json"]把channel_v3.json文件下载到本地,启动本地服务器,并开启本地访问channel_v3.json文件。wget使用代理:wget-e"http_proxy=http://username:password@ip:port"下载地址wget-e"https_proxy=http://username:password@ip:port"下载地址示例:wget-e"https_proxy=http://zhangsan:123456@192.168.1.11:8080"http://www.baidu.comwget-e"https_proxy=http://zhangsan:123456@192.168.1.11:8080"https://cn.wordpress.org/wordpress-4.7.2-zh_CN.zip
