2019-10-04 16:35:44.076 Switch: /ini=nul
2019-10-04 16:35:44.076 Switch: /ProxyMethod=2
2019-10-04 16:35:44.076 Switch: /ProxyHost=127.0.0.1
2019-10-04 16:35:44.076 Switch: /ProxyPort=9150
2019-10-04 16:35:44.076 Switch: /loglevel=2
2019-10-04 16:35:44.076 Proxy: None
I actually provide the command “/ProxyMethod=2 /ProxyHost=127.0.0.1 /ProxyPort=9150
” to the system, and the system confirms receiving it through the log as shown above. However, the system also records “Proxy: None“. I’m confused about whether the system is using the Tor proxy or not, and what the message “Proxy: None” implies.
3 Answers
Introduction
WinSCP is a popular open-source SFTP client and FTP client for Windows. It allows secure file transfers between a local and a remote computer. WinSCP supports various transfer protocols, including SFTP, SCP, FTP, and WebDAV. It also supports various proxy types, including HTTP, SOCKS 4, SOCKS 5, and FTP. When using a proxy, WinSCP logs the proxy details for the user’s reference. However, users may sometimes notice that WinSCP logs “Proxy: None” even though they have instructed it to use a proxy, such as Tor. This blog post aims to clarify why this happens and what the message “Proxy: None” implies.
What is Tor?
Tor is a free and open-source software that enables anonymous communication on the internet. It works by routing internet traffic through a worldwide network of volunteer-run servers called “nodes.” Each node encrypts the traffic it receives before passing it on to the next node in the network. This process makes it difficult for anyone to trace the traffic back to its source. Tor is commonly used by individuals who wish to protect their online privacy or evade internet censorship.
How to configure WinSCP to use Tor?
To configure WinSCP to use Tor, you need to have the Tor software installed on your computer. You also need to have a Tor client running on your computer, such as Tor Browser or Tor Expert Bundle. Once you have the Tor software installed and running, you can configure WinSCP to use it as a proxy by following these steps:
- Open WinSCP and go to the “Session” panel.
- Enter the hostname, username, and password of the remote server you want to connect to.
- Click on the “Advanced” button to open the “Advanced site settings” dialog box.
- Go to the “Connection” > “Proxy” panel.
- Select the “SOCKS 5” proxy type.
- Enter “127.0.0.1” as the proxy host and “9150” as the proxy port. These are the default settings for Tor.
- Click on the “OK” button to save the settings.
- Click on the “Login” button to connect to the remote server through Tor.
Why does WinSCP log “Proxy: None”?
When WinSCP logs “Proxy: None,” it means that WinSCP is not using a proxy for the current session. This message does not necessarily mean that WinSCP is not configured to use a proxy. Instead, it means that WinSCP is not currently using a proxy for the session you are viewing the logs for. There could be several reasons why WinSCP is not using a proxy, such as:
- The remote server does not support proxy connections.
- The proxy settings are incorrect or incomplete.
- The proxy server is not running or is not accessible from your computer.
- The proxy server is not configured to allow connections from WinSCP.
If you have configured WinSCP to use Tor, and the Tor client is running and accessible, then WinSCP should use Tor as a proxy for the session. However, the Tor network can sometimes be slow or unstable, which can cause WinSCP to fall back to a direct connection to the remote server. In such cases, WinSCP would log “Proxy: None” because it is not using Tor for that session.
How to confirm that WinSCP is using Tor?
If you want to confirm that WinSCP is using Tor for a session, you can look for the following logs in the WinSCP log file:
2019-10-04 16:35:44.076 Using proxy protocol version 5
2019-10-04 16:35:44.076 Proxy: SOCKS5, Host: 127.0.0.1, Port: 9150
2019-10-04 16:35:44.076 Proxy: Authenticate: username/password
2019-10-04 16:35:44.076 Proxy: Establishing encrypted connection using SSL/TLS
2019-10-04 16:35:44.076 Proxy: Tunneling to 1.2.3.4:22 using SOCKS5
These logs indicate that WinSCP is using the SOCKS 5 proxy protocol, and the proxy host is set to “127.0.0.1” with port “9150.” The logs also show that WinSCP is authenticating with the proxy using a username and password (if required) and establishing an encrypted connection using SSL/TLS. Finally, the logs show that WinSCP is tunneling to the remote server using the SOCKS 5 proxy.
Conclusion
WinSCP is a versatile file transfer client that supports various transfer protocols and proxy types. When using a proxy, WinSCP logs the proxy details for the user’s reference. However, users may sometimes notice that WinSCP logs “Proxy: None” even though they have instructed it to use a proxy, such as Tor. This message does not necessarily mean that WinSCP is not configured to use a proxy. Instead, it means that WinSCP is not currently using a proxy for the session you are viewing the logs for. To confirm that WinSCP is using Tor, you can look for specific logs in the WinSCP log file that indicate the use of the SOCKS 5 proxy protocol, the proxy host and port, and the encrypted tunneling to the remote server. If you are having trouble using WinSCP with Tor, you should check your Tor settings and ensure that the Tor client is running and accessible from your computer.
The log message “Proxy: None” indicates that WinSCP is not using a proxy. This could be due to a number of reasons, such as a misconfiguration in the proxy settings or a problem with the proxy itself.
To use a proxy with WinSCP, you need to specify the proxy host and port using the /ProxyHost and /ProxyPort switches, as well as the proxy method using the /ProxyMethod switch. The value of the /ProxyMethod switch should be set to 2 to indicate that you want to use a SOCKS proxy.
It’s also possible that the log message “Proxy: None” could be caused by a problem with the proxy server itself. For example, if the proxy server is not running or is not reachable, then WinSCP will not be able to use it.
To troubleshoot this issue, you may want to try verifying that the proxy server is running and reachable, and that the proxy settings in WinSCP are correct. You may also want to check for any errors in the log file that could provide more information about the issue.
If you are trying to use a SOCKS proxy with WinSCP and the log message “Proxy: None” is appearing, it could be due to a misconfiguration in the proxy settings or a problem with the proxy server itself. To troubleshoot this issue, you should verify that the proxy server is running and reachable, and that the proxy settings in WinSCP are correct. You may also want to check for any errors in the log file that could provide more information about the issue.
It’s also a good idea to make sure that you are using the correct proxy method (in this case, /ProxyMethod=2) and that you have specified the correct proxy host and port (/ProxyHost and /ProxyPort).
If you continue to have trouble using a proxy with WinSCP, you may want to consider seeking help from the WinSCP community or contacting the WinSCP support team for further assistance.
I actually provide the command “/ProxyMethod=2 /ProxyHost=127.0.0.1 /ProxyPort=9150″…
The syntax used previously is incorrect. The system simply records all parameters it receives, without necessarily verifying their accuracy. To use the correct syntax, you should include the “when” command in your open command:
open <url> /rawsettings ProxyMethod=2 ProxyHost=127.0.0.1 ProxyPort=9150
WinSCP GUI can generate a correct script template for you.
See also the example for raw session settings use.