Open zhangbin90 opened 4 years ago
@DannyDainton, could this be filed as a feature request (to make its way to "Settings" tab that's within each request definition)?
The feature is on great demand, but there is a bypass to add bypass hosts in Proxy settings tab
@DannyDainton Can we reopen this? Or is this a "won't fix"? My use case is dealing with old data providers whose security consists of a domain whitelist, so any requests in Postman must be proxied through specific servers.
It seems like the Request definition contains a proxy setting, maybe that can be updated in the pre-request script. If anyone can confirm that'd be great http://www.postmanlabs.com/postman-collection/Request.html#~definition
I think we can use tool like privoxy to utilize at hand socks5 proxy, it will working as a bridge between postman http/https and your socks5. Most importantly, supporting customized proxied domains.
I too need to set a proxy for a single request in my collection.
The pre-request script for my request looks like this:
// From http://www.postmanlabs.com/postman-collection/Request.html#~definition
const ProxyConfig = require('postman-collection').ProxyConfig;
pm.request.proxy = new ProxyConfig({
host: `my.proxy.com`,
match: 'http+https://*\/*',
port: 9999,
tunnel: true,
disabled: false,
authenticate: true,
username: 'myUsername',
password: 'myPassword',
});
However, the request simply times out (Error: connect ETIMEDOUT
), where as a curl
command works as expected:
curl --location --request GET "https://some.rest.api/" --proxy https://myUsername:myPassword@my.proxy.com:9999"
Has anybody had any progress with this?
@DannyDainton Please see my previous post where I'm assigning a ProxyConfig
to the pm.request.proxy
but nothing seems to happen (i.e. the request is not going through the proxy). Is that the expected behavior?
Would appreciate it if you could reopen the issue as either a bug report (because the proxy is not working as expected), a feature request (because it's a useful feature that people have been asking for) or a feedback (because the proxy is useless? / requires better documentation?).
Reopening this based on the additional messages after the issue was closed.
I need this function too,how is it going?
Hey @zhangbin90
A proxy will be applied to all requests and cannot be used against just a single request.
https://learning.postman.com/docs/sending-requests/capturing-request-data/proxy/#configuring-proxy-settings