简体   繁体   English

NPM 用于从 Mac 和 Linux 获取代理设置的节点包

[英]NPM NODE packages for fetching proxy settings from Mac and Linux

Do we have any NPM NODE packages for fetching proxy settings(Could be manual and Pac) from Mac and Linux?我们是否有任何 NPM 节点包用于从 Mac 和 Linux 获取代理设置(可能是手动和 Pac)?

For windows we have https://www.npmjs.com/package/get-proxy-settings .对于 windows 我们有https://www.npmjs.com/package/get-proxy-settings

The HTTP_PROXY or HTTPS_PROXY env var is the closest thing to a linux standard, so you should be fine with that module. HTTP_PROXYHTTPS_PROXY env var 是最接近 linux 标准的东西,因此您应该可以使用该模块。

Mac is a bit harder...麦克有点难...

Probably need to use NodObjC or jscocoa to access the CFNetwork API calls like CFNetworkCopySystemProxySettings()可能需要使用NodObjCjscocoa来访问CFNetwork API 调用,如CFNetworkCopySystemProxySettings()

For Mac: Use this NPM https://www.npmjs.com/package/macos-system-proxy-settings to get the proxy settings of MAC.对于 Mac:使用此 NPM https://www.npmjs.com/package/macos-system-proxy-settings获取 MAC 的代理设置。 Basically, it uses the command scutil --proxy.基本上,它使用命令 scutil --proxy。

https://dmorgan.info/posts/mac-network-proxy-terminal/ https://dmorgan.info/posts/mac-network-proxy-terminal/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM