WinSCP .NET assembly: Where to define proxy?

后端 未结 1 408
太阳男子
太阳男子 2021-01-05 01:08

I am able to define the proxy server by using the WinSCP GUI. If I do this I am able to connect to a remote host. But in code I don\'t find a way to declare the proxy server

相关标签:
1条回答
  • 2021-01-05 01:20

    Use the SessionOptions.AddRawSettings to configure raw session settings appropriate for your kind of proxy.

    For example:

    sessionOptions.AddRawSettings("ProxyMethod", "3");
    sessionOptions.AddRawSettings("ProxyHost", "proxy");
    

    See a full list of raw sessions settings.


    Though a way easier is to configure the proxy in WinSCP GUI and have it generate a code template for you.

    0 讨论(0)
提交回复
热议问题