socks5背后的webpack开发服务器代理目标

时间:2019-02-28 10:05:15

标签: npm webpack openvpn

我正在运行一个angularjs应用程序,该应用程序使用webpack-dev-server来指定后端目标网址,即http / https请求应发送到的位置。像这样:

devServer: {
    contentBase: "./publish",
    port: 9000,
    proxy: {
        "/api": {
            target: process.env.URL || "http://localhost:8080",
            changeOrigin: true
        }
    },
    ...
}

出于安全原因,现在目标URL要求使用OpenVPN,并且我所在的目标URL的IP地址已被阻止,因此我设置了同时运行shadowsocks和openVPN的VPS。

现在,在本地计算机上,我可以在Chrome浏览器中打开目标网址,但是当 我跑

URL="https://<the target url>" npm start

我要

[HPM] Error occurred while trying to proxy request...(ENOTFOUND)

有什么想法吗?预先感谢。

0 个答案:

没有答案
相关问题