在Ubuntu中为PhpStorm设置代理有以下两种常用方法:
/etc/environment文件,添加http_proxy="http://proxy_ip:proxy_port"和https_proxy="http://proxy_ip:proxy_port"(若需认证,格式为http_proxy="http://username:password@proxy_ip:proxy_port"),保存后执行source /etc/environment或重新登录使配置生效。File > Settings(或PhpStorm > Preferences),在左侧导航栏选择Appearance & Behavior > System Settings > HTTP Proxy,选择Manual proxy configuration,输入代理地址和端口,如需认证则勾选Proxy authentication并输入用户名和密码,点击OK保存。