A script used to change proxy the properties at run time. The script can also be used to do special validation at run time.
This will allow use of certain proxy provider options, such as sticky proxy sessions where the session ID is specified as part of the proxy username.
This will also allow custom proxy verification before the proxy is being used. If a proxy is not valid, the script should return a value indicating rotation of proxies, and if the proxy should be removed from the pool.
Proxy transformation takes place just before any proxy is used. It's agent wide by nature. Below are the some example use cases when we can use Proxy Transformation:
- It can be used when a proxy may need custom verification at runtime, to avoid extracting bad data for example.
- A proxy may need custom username parameters at runtime to specify session.
- Proxies may need to be disabled for specific URLs.
Proxy Transformation Script available on the Agent Command Properties Tab.
public class Script
//See help for a definition of ProxyTransfomationScriptArguments.
public static TransformedProxy TransformProxy(ProxyTransfomationScriptArguments args)
return args.Proxy.GetTransformedProxy("184.108.40.206:60000", "username", "pswd");
import clr from Sequentum.ContentGrabber.Api import * def TransformProxy(args): return args.Proxy.GetTransformedProxy("220.127.116.11:60000", "username", "pswd");