TortoiseSVN through a proxy script

后端 未结 2 1502
太阳男子
太阳男子 2021-02-08 13:36

I\'m attempting to connect to a remote HTTPS SVN server from inside a corporate firewall using TortoiseSVN. I am required to use a proxy for this connection. My problem is that

相关标签:
2条回答
  • 2021-02-08 13:56

    AFAIK TortoiseSVN and Subversion in general lacks direct support for proxy configuration scripts (aka *.pac files).

    As mentioned in the accepted answer, you can download the proxy config script, extract the matching rule from the configuration and set it as proxy, but this workaround has two drawbacks:

    1. Whenever your sysadmins change the config script, you will run into connectivity problems, which will take time to diagnose, then you'll have to take another look at the configuration script, change your settings, etc.

    2. If the SVN servers used fall under multiple proxy configuration rules resulting in multiple proxy servers used, you will have to change your TSVN proxy settings whenever you want to connect to another SVN server.

    Now the former problem (maintenance) is beyond what I could solve, but the latter (sophisticated proxy config), may be tackled using Subversion's servers configuration file, which is itself a kind of proxy configuration file. The file can be reached via context menu / TortoiseSVN / Settings / Network tab / Subversion server file / Edit button.

    The default servers file is pretty well commented, including some examples. Two important features to look for are groups and the http-proxy-exceptions setting. Using the servers file you will be able to set up simple proxy rules based on the original proxy configuration script.

    The official Subversion FAQ also mentions the servers file.

    0 讨论(0)
  • 2021-02-08 14:03

    There may be a cleaner way to do this but you could simply get the URL of the automatic configuration file from your firefox settings and open it: .pac files are raw text with a fairly simple syntax.

    Extracting the ip/port and other configuration info for your corporate proxy from that file should be relatively simple (look for the one that applies to your IP range if there are more than one).

    Obviously, this isn't very pretty in the sense that, if the proxy configuration changes, you'll have to do this again instead of benefiting from the automated settings. In practice, this simple trick has been very useful for everything from Putty to TortoiseSVN for me !

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