{"thread":{"id":"17105","subject":"Help! My ISP blocks repo.or.cz. How to push changes?","startedAt":"2009-01-12T01:46:28Z","lastAt":"2009-01-14T17:18:19Z","messageCount":13,"participants":["Jakub Narebski","Alex Riesen","Asheesh Laroia","Luciano Rocha","Mike Hommey","Markus Heidelberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100052","messageId":"200901120246.28364.jnareb@gmail.com","threadId":"17105","inReplyTo":null,"subject":"Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-12T01:46:28Z","receivedAt":"2009-01-12T01:46:28Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"The ISP I use (Telekomunikacja Polska S.A., aka TP) made some \nunannounced changes for ADSL service (Neostrada) which made it block \nrepo.or.cz (and of course its aliases, including git.or.cz where git \nwiki resides). It blocks also gimp.org and some Polish IRC servers \n(irc.freenode.org on which #git resides works O.K.). People speculate \nthat this blocking was based on MAPS (Mail Abuse Prevention System, \nwhich is SPAM backwards) lists to fight SPAM and/or to block botnets,\nand uses null routing (IP based) blocking. I have no idea why repo.or.cz \nis blocked: gimp.org is supposedly blocked because it hosts \nirc.gimp.org on the same IP. By block I mean that even ping doesn't \nwork (no reply at all).\n\nI can access git wiki via one of many free HTTP proxies; currently I use \nhttp://www.4proxy.de so there are only slight problems there.  \n\n\nThe problems is with fetching (via git:// protocol) of forks of git \nrepository on repo.or.cz, and pushing (via SSH) to a few of my git \nrepositories hosted on repo.or.cz.\n\nDo you have any suggestions to bypass this block for git? I have access \nto Linux shell account (no root access, though) which doesn't have \nproblems with repo.or.cz, so I think I could set up SSH tunnel: but \nhow? And what to do with access via git:// - move to SSH too?\n\nThanks in advance\n-- \nJakub Narebski\nPoland\n\nhttp://forums.thedailywtf.com/forums/t/10789.aspx\n"},{"id":"100088","messageId":"81b0412b0901120117mf010317m79874a235e29a439@mail.gmail.com","threadId":"17105","inReplyTo":"200901120246.28364.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-01-12T09:17:07Z","receivedAt":"2009-01-12T09:17:07Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2009/1/12 Jakub Narebski <jnareb@gmail.com>:\n> Do you have any suggestions to bypass this block for git? I have access\n> to Linux shell account (no root access, though) which doesn't have\n> problems with repo.or.cz, so I think I could set up SSH tunnel: but\n> how? And what to do with access via git:// - move to SSH too?\n\nSee man ssh, look for -L. It works for arbitrary ports, so you can redirect\ngit:// port to anywhere. Same for push over ssh, just give another port when\nconnecting.\n"},{"id":"100090","messageId":"alpine.DEB.2.00.0901120057280.8369@vellum.laroia.net","threadId":"17105","inReplyTo":"200901120246.28364.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2009-01-12T09:21:34Z","receivedAt":"2009-01-12T09:21:34Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"This is a little off-topic, but you CC:d the git list first. (-;\n\nOn Mon, 12 Jan 2009, Jakub Narebski wrote:\n\n> The ISP I use (Telekomunikacja Polska S.A., aka TP) made some\n> unannounced changes for ADSL service (Neostrada) which made it block\n> repo.or.cz (and of course its aliases, including git.or.cz where git\n> wiki resides). It blocks also gimp.org and some Polish IRC servers\n> (irc.freenode.org on which #git resides works O.K.). People speculate\n> that this blocking was based on MAPS (Mail Abuse Prevention System,\n> which is SPAM backwards) lists to fight SPAM and/or to block botnets,\n> and uses null routing (IP based) blocking. I have no idea why repo.or.cz\n> is blocked: gimp.org is supposedly blocked because it hosts\n> irc.gimp.org on the same IP. By block I mean that even ping doesn't\n> work (no reply at all).\n\nThat's horrifying.\n\n> I can access git wiki via one of many free HTTP proxies; currently I use\n> http://www.4proxy.de so there are only slight problems there.\n>\n> The problems is with fetching (via git:// protocol) of forks of git\n> repository on repo.or.cz, and pushing (via SSH) to a few of my git\n> repositories hosted on repo.or.cz.\n>\n> Do you have any suggestions to bypass this block for git? I have access\n> to Linux shell account (no root access, though) which doesn't have\n> problems with repo.or.cz, so I think I could set up SSH tunnel: but\n> how? And what to do with access via git:// - move to SSH too?\n\n$ ssh -D 1080 user@host\n\nIn a a separate terminal:\n\n$ cat > /tmp/tsocks.conf\n# Here we have a config for tsocks that uses localhost:1080 as SOCKS5.\nserver = 127.0.0.1\n# Server type defaults to 4 so we need to specify it as 5 for this one\nserver_type = 5\n# The port defaults to 1080 but I've stated it here for clarity\nserver_port = 1080\n^D\n$ export TSOCKS_CONF_FILE=/tmp/tsocks.conf\n$ tsocks lynx http://repo.or.cz/\n\nYou would need the 'tsocks' tool for your client system. Note that the \nremote system doesn't need any configuration this way. Just prefix any \ncommand-line operations that involve repo.or.cz with 'tsocks' and be sure \nto set TSOCKS_CONF_FILE. (On a Windows machine, use putty's graphical SSH \nclient and FreeCap <http://www.freecap.ru/eng/>.\n\nOnce you have the 'ssh -D' tunnel running, you can use it in Firefox as a \nSOCKS proxy: host = localhost, port = 1080.\n\n-- Asheesh.\n\n-- \nDon't relax!  It's only your tension that's holding you together.\n"},{"id":"100104","messageId":"200901121213.45858.jnareb@gmail.com","threadId":"17105","inReplyTo":"81b0412b0901120117mf010317m79874a235e29a439@mail.gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-12T11:13:44Z","receivedAt":"2009-01-12T11:13:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Alex Riesen wrote:\n> 2009/1/12 Jakub Narebski <jnareb@gmail.com>:\n\n> > Do you have any suggestions to bypass this block for git? I have access\n> > to Linux shell account (no root access, though) which doesn't have\n> > problems with repo.or.cz, so I think I could set up SSH tunnel: but\n> > how? And what to do with access via git:// - move to SSH too?\n> \n> See man ssh, look for -L. It works for arbitrary ports, so you can redirect\n> git:// port to anywhere. Same for push over ssh, just give another port when\n> connecting.\n\nCurrently I have the folowing in my ~/.ssh/config:\n\n  # TP S.A. blocks repo.or.cz\n  Host repo.or.cz\n\tNoHostAuthenticationForLocalhost yes\n\tHostName localhost\n\tPort 2222\n\nand I can simply use \"git push repo\" without any changes.\nBut I have to run \n\n $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n\nfirst. Is there any way to automate this?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"100108","messageId":"20090112112007.GA3841@bit.office.eurotux.com","threadId":"17105","inReplyTo":"200901121213.45858.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2009-01-12T11:20:07Z","receivedAt":"2009-01-12T11:20:07Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Mon, Jan 12, 2009 at 12:13:44PM +0100, Jakub Narebski wrote:\n> Alex Riesen wrote:\n> > 2009/1/12 Jakub Narebski <jnareb@gmail.com>:\n> \n> > > Do you have any suggestions to bypass this block for git? I have access\n> > > to Linux shell account (no root access, though) which doesn't have\n> > > problems with repo.or.cz, so I think I could set up SSH tunnel: but\n> > > how? And what to do with access via git:// - move to SSH too?\n> > \n> > See man ssh, look for -L. It works for arbitrary ports, so you can redirect\n> > git:// port to anywhere. Same for push over ssh, just give another port when\n> > connecting.\n> \n> Currently I have the folowing in my ~/.ssh/config:\n> \n>   # TP S.A. blocks repo.or.cz\n>   Host repo.or.cz\n> \tNoHostAuthenticationForLocalhost yes\n> \tHostName localhost\n> \tPort 2222\n> \n> and I can simply use \"git push repo\" without any changes.\n> But I have to run \n> \n>  $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n> \n> first. Is there any way to automate this?\n\nFor those cases I use the attached script. Read the first lines, with\ninformation on how to install.\n\nThe end result is that I can do:\nssh host1--host2--host3\n\nOr scp, rsync, etc.\n\nRegards,\nLuciano Rocha\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n\n\n#!/bin/bash\n## SSH connection chaining\n##\n## (C) 2007, Luciano Rocha <strange@nsk.pt>\n##\n## This program is free software; you can redistribute it and/or\n## modify it under the terms of the GNU General Public License\n## as published by the Free Software Foundation; either version 2\n## of the License, or (at your option) any later version.\n## \n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n## GNU General Public License for more details.\n## \n## You should have received a copy of the GNU General Public License\n## along with this program; if not, write to the Free Software\n## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n## MA 02110-1301, USA.\n## \n## Or check the webpage: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n##\n## Documentation:\n##\n## Include in your .ssh/config:\n## host *--*\n## proxycommand ssh_p %h %p\n##\n## And then you can do:\n## ssh hosta--hostb--hostc\n## scp hosta--hostb--hostc:file .\n##\n## A user specification is also possible, but not for the last host, for\n## that one, you'll have to use ssh's standard user specification (user@host\n## or -luser):\n## ssh usera_hosta--userb_hostb--hostc -luserc\n## scp userc@usera_hosta--userb_hostb--hostc:file .\n##\n## Compression is disable on all proxy sshs, as traffic is already encrypted.\n## Activate compression in the master ssh command, if desired.\n##\n## Environment variable SSH_CONFIG_FILE can point to a ssh configuration\n## file for use in the proxy sshs.\n\n## missing hops\nh=\"${1%--*}\"\n## nc target\nrh=\"${1##*--}\"\np=\"${2:-22}\"\n\n\n## user for next hop\nu=\nn=\"${h##*--}\"\nif [ -z \"${n##*_*}\" ]; then\n\tu=${n%%_*}\n\tif [ \"$h\" != \"$n\" ]; then\n\t\th=\"${h%--*}--${n##*_}\"\n\telse\n\t\th=\"${n##*_}\"\n\tfi\nfi\n\necho \"${SSH_INDENT}+ connecting to $h for $rh\" >&2\n\n\nexec env SSH_INDENT=\"${SSH_INDENT} \" ssh -o \"Compression no\" \\\n\t${SSH_CONFIG_FILE:+-F$SSH_CONFIG_FILE} \\\n\t${u:+$u@}$h \\\n\t\"echo \\\"${SSH_INDENT}- connected to $h, forwarding to $rh:$p\\\" >&2 ; nc -w 3600 $rh $p\"\n"},{"id":"100107","messageId":"alpine.DEB.2.00.0901120324490.18989@vellum.laroia.net","threadId":"17105","inReplyTo":"200901121213.45858.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2009-01-12T11:25:34Z","receivedAt":"2009-01-12T11:25:34Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Mon, 12 Jan 2009, Jakub Narebski wrote:\n\n> But I have to run\n>\n> $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n>\n> first. Is there any way to automate this?\n\nCheck out 'gstm' or 'autossh'.\n\n-- Asheesh.\n\n-- \nYou will get what you deserve.\n"},{"id":"100114","messageId":"20090112122337.GA7262@glandium.org","threadId":"17105","inReplyTo":"200901121213.45858.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2009-01-12T12:23:38Z","receivedAt":"2009-01-12T12:23:38Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, Jan 12, 2009 at 12:13:44PM +0100, Jakub Narebski <jnareb@gmail.com> wrote:\n> Alex Riesen wrote:\n> > 2009/1/12 Jakub Narebski <jnareb@gmail.com>:\n> \n> > > Do you have any suggestions to bypass this block for git? I have access\n> > > to Linux shell account (no root access, though) which doesn't have\n> > > problems with repo.or.cz, so I think I could set up SSH tunnel: but\n> > > how? And what to do with access via git:// - move to SSH too?\n> > \n> > See man ssh, look for -L. It works for arbitrary ports, so you can redirect\n> > git:// port to anywhere. Same for push over ssh, just give another port when\n> > connecting.\n> \n> Currently I have the folowing in my ~/.ssh/config:\n> \n>   # TP S.A. blocks repo.or.cz\n>   Host repo.or.cz\n> \tNoHostAuthenticationForLocalhost yes\n> \tHostName localhost\n> \tPort 2222\n> \n> and I can simply use \"git push repo\" without any changes.\n> But I have to run \n> \n>  $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n> \n> first. Is there any way to automate this?\n\nSomething like the following should do the trick:\nHost repo.or.cz\n\tProxyCommand ssh jnareb@host.example.com nc %h %p\n\nYou will need nc (netcat) installed on the host.example.com server, though.\n\nMike\n"},{"id":"100194","messageId":"200901130039.48340.jnareb@gmail.com","threadId":"17105","inReplyTo":"alpine.DEB.2.00.0901120324490.18989@vellum.laroia.net","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-12T23:39:47Z","receivedAt":"2009-01-12T23:39:47Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Asheesh Laroia wrote:\n> On Mon, 12 Jan 2009, Jakub Narebski wrote:\n> \n> > But I have to run\n> >\n> > $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n> >\n> > first. Is there any way to automate this?\n> \n> Check out 'gstm' or 'autossh'.\n\nI don't know about gSTM (Gnome SSH Tunnel Manager), but autossh\ndoes only provide reconnect in the case the gateway host closes\nconnection. I still have to run it, perhaps from startup script.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"100195","messageId":"200901130043.04772.jnareb@gmail.com","threadId":"17105","inReplyTo":"20090112122337.GA7262@glandium.org","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-12T23:43:04Z","receivedAt":"2009-01-12T23:43:04Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 12 January 2009, Mike Hommey wrote:\n> On Mon, Jan 12, 2009 at 12:13:44PM +0100, Jakub Narebski <jnareb@gmail.com> wrote:\n\n>> Currently I have the folowing in my ~/.ssh/config:\n>> \n>>   # TP S.A. blocks repo.or.cz\n>>   Host repo.or.cz\n>> \tNoHostAuthenticationForLocalhost yes\n>> \tHostName localhost\n>> \tPort 2222\n>> \n>> and I can simply use \"git push repo\" without any changes.\n>> But I have to run \n>> \n>>  $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n>> \n>> first. Is there any way to automate this?\n> \n> Something like the following should do the trick:\n> Host repo.or.cz\n> \tProxyCommand ssh jnareb@host.example.com nc %h %p\n> \n> You will need nc (netcat) installed on the host.example.com server, though.\n\nI assume that is both in place of above ~/.ssh/config configuration,\nand making unnecessary port forwarding (ssh -L) invocation, isn't it?\n\nP.S. What should I put in core.gitProxy to make it possible to fetch\nvia git:// protocol from repo.or.cz?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"100210","messageId":"200901130159.47271.markus.heidelberg@web.de","threadId":"17105","inReplyTo":"200901130043.04772.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-01-13T00:59:46Z","receivedAt":"2009-01-13T00:59:46Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Jakub Narebski, 13.01.2009:\n> P.S. What should I put in core.gitProxy to make it possible to fetch\n> via git:// protocol from repo.or.cz?\n\nI'm not sure if this is what you need, but I use this at work for\nfetching via git protocol:\n\n[core]\n\tgitProxy = /etc/gitproxy.sh for kernel.org\n\tgitProxy = /etc/gitproxy.sh for or.cz\n\t# and several others ...\n\ngitproxy.sh:\n#! /bin/sh\n(echo \"CONNECT $1:$2 HTTP/1.0\"; echo; cat ) | socket <company proxy host> <port> | (read a; read a; cat )\n\nMarkus\n"},{"id":"100307","messageId":"alpine.DEB.2.00.0901131212390.14410@vellum.laroia.net","threadId":"17105","inReplyTo":"200901130039.48340.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes?","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2009-01-13T20:13:22Z","receivedAt":"2009-01-13T20:13:22Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Tue, 13 Jan 2009, Jakub Narebski wrote:\n\n> Asheesh Laroia wrote:\n>> On Mon, 12 Jan 2009, Jakub Narebski wrote:\n>>\n>>> But I have to run\n>>>\n>>> $ ssh -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n>>>\n>>> first. Is there any way to automate this?\n>>\n>> Check out 'gstm' or 'autossh'.\n>\n> I don't know about gSTM (Gnome SSH Tunnel Manager), but autossh\n> does only provide reconnect in the case the gateway host closes\n> connection. I still have to run it, perhaps from startup script.\n\nYeah, gSTM is pretty manual in that regard. autossh from a startup script \nmakes sense.\n\n-- Asheesh.\n\n-- \nQ:\tHow many marketing people does it take to change a light bulb?\nA:\tI'll have to get back to you on that.\n"},{"id":"100409","messageId":"200901141455.23935.jnareb@gmail.com","threadId":"17105","inReplyTo":"200901130043.04772.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes? (a solution)","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-14T13:55:20Z","receivedAt":"2009-01-14T13:55:20Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jakub Narebski wrote:\n\n> The ISP I use (Telekomunikacja Polska S.A., aka TP) made some\n> unannounced changes for ADSL service (Neostrada) which made it block\n> repo.or.cz (and of course its aliases, including git.or.cz where git\n> wiki resides).\n\nThank you all for your help with arriving at solution. I'll describe it \nbelow; perhaps it would help somebody else (now that it is in mailing \nlist archive).\n\n\nFirst, let me explain what I am working with:\n\nI have access to shell account with set up SSH key access; let's name \nthis machine host.example.com. I don't have admin rights there, and \nquota is quite tight; I have installed netcat (nc) in ~/bin - it is \nonly 22 kB.\n\nI don't know where to find SOCKS5 proxy, and I don't have 'tsocks'\ninstalled either on my computer, or on shell account... I think.\n\n\nNow, solutions:\n\n1. For reading gitweb at repo.or.cz, and for reading and editing git \n   wiki at http://git.or.cz/gitwiki/ I use one of free HTTP proxies:\n   http://www.4proxy.de (first such proxy I have found that has an\n   option to _not_ obfuscate URLs; it still unnecessary escapes some\n   things like '/' in the query argument).\n\n2. For pushing changes to repo.or.cz I use SSH tunnel (I could have\n   used ProxyCommand solution with netcat instead[1]). I run:\n\n   $ autossh -M 2000 -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n\n   at startup, and I have set the following in ~/.ssh/config:\n\n   # TP S.A. blocks repo.or.cz\n   Host repo.or.cz\n   \t#ssh -f -N -L 2222:repo.or.cz:22 host.example.com\n   \tNoHostAuthenticationForLocalhost yes\n   \tHostName localhost\n   \tPort 2222\n\n   [1] Alternate solution:\n\n   # TP S.A. blocks repo.or.cz\n   Host repo.or.cz\n\tProxyCommand ssh host.example.com exec /home/jnareb/bin/nc %h %p\n\n3. For fetching changes via git:// protocol from repo.or.cz I use the\n   following setup in git config:\n\n   [core]\n   \tgitProxy = ssh-proxy for \"repo.or.cz\"\n\n   Unfortunately example from Documentation/config.txt with \"ssh\" as\n   git proxy command doesn't work, and neither putting command with\n   options (e.g. \"ssh host.example.com /home/jnareb/bin/nc\") doesn't\n   work: the command is _not_ split on whitespace. So I had to use\n   helper script ~/bin/ssh-proxy:\n\n   #!/bin/sh\n\n   ssh host.example.com /home/jnareb/bin/nc \"$1\" \"$2\"\n\n\nI hope that would help somebody... and if somebody notices better \nsolution, hs/she would provide me with it :-)\n\n-- \nJakub Narebski\nPoland\n"},{"id":"100446","messageId":"alpine.DEB.2.00.0901140913310.23681@vellum.laroia.net","threadId":"17105","inReplyTo":"200901141455.23935.jnareb@gmail.com","subject":"Re: Help! My ISP blocks repo.or.cz. How to push changes? (a solution)","fromName":"Asheesh Laroia","fromEmail":"asheesh@asheesh.org","sentAt":"2009-01-14T17:18:19Z","receivedAt":"2009-01-14T17:18:19Z","isPatch":false,"sender":{"key":"asheesh@asheesh.org","avatar":"https://avatars.githubusercontent.com/u/25457?v=4"},"body":"On Wed, 14 Jan 2009, Jakub Narebski wrote:\n\n> Jakub Narebski wrote:\n>\n>> The ISP I use (Telekomunikacja Polska S.A., aka TP) made some\n>> unannounced changes for ADSL service (Neostrada) which made it block\n>> repo.or.cz (and of course its aliases, including git.or.cz where git\n>> wiki resides).\n>\n> Thank you all for your help with arriving at solution. I'll describe it\n> below; perhaps it would help somebody else (now that it is in mailing\n> list archive).\n\nI'll just add some comments that explain what I suggested with a little \nmore clarity. I'm not saying you have to use it or anything, I just want \nto make sure I was clear!\n\nAnd I'm glad you have a solution!\n\n> First, let me explain what I am working with:\n>\n> I have access to shell account with set up SSH key access; let's name\n> this machine host.example.com. I don't have admin rights there, and\n> quota is quite tight; I have installed netcat (nc) in ~/bin - it is\n> only 22 kB.\n\nYes, that is great!\n\n> I don't know where to find SOCKS5 proxy, and I don't have 'tsocks' \n> installed either on my computer, or on shell account... I think.\n\ntsocks is packaged in Debian, and surely in other distributions as well. \nYou don't run it on the shell account, but on your own workstation (which \nI call \"laptop\" below for clarity).\n\nA SOCKS5 proxy can be generated by ssh by running:\n\n \t[user@laptop] $ ssh -D 1080 shelluser@shellbox\n\nNow:\n \t[user@laptop] $ telnet localhost 1080\n\nwill demonstrate that local port 1080 is listening. Because you created it \nwith -D to ssh, that local port 1080 *is* a SOCKS5 proxy, created by the \nlocal SSH client.\n\n> Now, solutions:\n>\n> 1. For reading gitweb at repo.or.cz, and for reading and editing git\n>   wiki at http://git.or.cz/gitwiki/ I use one of free HTTP proxies:\n>   http://www.4proxy.de (first such proxy I have found that has an\n>   option to _not_ obfuscate URLs; it still unnecessary escapes some\n>   things like '/' in the query argument).\n\nGreat! (Though note that configuring the web browser to use your \nSSH-created SOCKS5 proxy would let you avoid this escaping since the whole \nsystem would be under your control.)\n\n> 2. For pushing changes to repo.or.cz I use SSH tunnel (I could have\n>   used ProxyCommand solution with netcat instead[1]). I run:\n>\n>   $ autossh -M 2000 -f -N -L 2222:repo.or.cz:22 jnareb@host.example.com\n>\n>   at startup, and I have set the following in ~/.ssh/config:\n>\n>   # TP S.A. blocks repo.or.cz\n>   Host repo.or.cz\n>   \t#ssh -f -N -L 2222:repo.or.cz:22 host.example.com\n>   \tNoHostAuthenticationForLocalhost yes\n>   \tHostName localhost\n>   \tPort 2222\n>\n>   [1] Alternate solution:\n>\n>   # TP S.A. blocks repo.or.cz\n>   Host repo.or.cz\n> \tProxyCommand ssh host.example.com exec /home/jnareb/bin/nc %h %p\n\nRight-o.\n\n> 3. For fetching changes via git:// protocol from repo.or.cz I use the\n>   following setup in git config:\n>\n>   [core]\n>   \tgitProxy = ssh-proxy for \"repo.or.cz\"\n>\n>   Unfortunately example from Documentation/config.txt with \"ssh\" as\n>   git proxy command doesn't work, and neither putting command with\n>   options (e.g. \"ssh host.example.com /home/jnareb/bin/nc\") doesn't\n>   work: the command is _not_ split on whitespace. So I had to use\n>   helper script ~/bin/ssh-proxy:\n>\n>   #!/bin/sh\n>\n>   ssh host.example.com /home/jnareb/bin/nc \"$1\" \"$2\"\n\nGreat!\n\n> I hope that would help somebody... and if somebody notices better \n> solution, hs/she would provide me with it :-)\n\n(-:\n\n-- Asheesh.\n\n-- \nA visit to a fresh place will bring strange work.\n"}]}