使用 隧道技术 使用http代理连接 svn:// git://
问题点 在某些情况下 无法通过代理 用 svn 访问svn://协议例如(svn://www.qdac.cc ) 故此有了此贴
远端需要一个代理 服务器
connect-tunnel -P 代理服务器IP:端口 -T 本机开放端口:被代理的域名:端口
connect-tunnel -P 127.0.0.1:8080 -T 3690:www.qdac.cc:3690
SS代理在本机 3690 是svn:://协议端口 改hosts强制www.qdac.cc转到本机 这样访问3690 就能通过隧道进入www.qdac.cc:3690
来源https://stackoverflow.com/questions/82530/svn-over-http-proxy
ubuntu
https://packages.ubuntu.com/bionic/libnet-proxy-perl
sudo apt install libnet-proxy-perl
使用说明
https://metacpan.org/pod/release/BOOK/Net-Proxy-0.12/script/connect-tunnel
NAME
connect-tunnel - Create CONNECT tunnels through HTTP proxies SYNOPSIS
connect-tunnel [ -Lv ] [ -A user:pass ] [ -P proxy:port ] [ -C controlport ] [ -T port:host:hostport ] DESCRIPTION
connect-tunnel sets up tunneled connections to external hosts by redirecting connections to local ports towards thoses hosts/ports through a HTTP proxy. connect-tunnel makes use of the HTTP CONNECT method to ask the proxy to create a tunnel to an outside server. Be aware that some proxies are set up to deny outside tunnels (either to ports other than 443 or outside a specified set of outside hosts). OPTIONS
The program follows the usual GNU command line syntax, with long options starting with two dashes. -A, --proxy-authentication user:password
Proxy authentication information. Please note that all the authentication schemes supported by LWP::UserAgent are supported (we use an LWP::UserAgent internally to contact the proxy). -C, --control-port controlport
The port to which one can connect to issue control commands to connect-tunnel. See "CONTROL CONNECTIONS" for more details about the available commands. -L, --local-only
Create the tunnels so that they will only listen on localhost. Thus, only connections originating from the machine that runs connect-tunnel will be accepted. That was the default behaviour in connect-tunnel version 0.02. -P, --proxy proxy[:port]
The proxy is required to connect the tunnels. If no port is given, 8080 is used by default. See also "ENVIRONMENT VARIABLES". -T, --tunnel port:host:hostport
Specifies that the given port on the local host is to be forwarded to the given host and hostport on the remote side. This works by allocating a socket to listen to port on the local side, and whenever a connection is made to this port, connect-tunnel forwards it to the proxy (with the credentials, if required), which in turn forwards it to the final destination. Note that this does not imply the use of any cryptographic system (SSL or any other). This is a simple TCP redirection. The security if any, is the one provided by the protocol used to connect to the destination through connect-tunnel. On Unix systems, only root can forward privileged ports. Note that you can setup tunnels to multiple destinations, by using the --tunnel option several times. -U, --user-agent string
Specify User-Agent value to send in HTTP requests. The default is to send connect-tunnel/version. -v, --verbose
Verbose output. This option can be used several times for more verbose output. EXAMPLES
To connect to a SSH server running on ssh.example.com, on port 443, through the proxy proxy.company.com, running on port 8080, use the following command: connect-tunnel -P proxy.company.com:8080 -T 22:ssh.example.com:443
And now point your favorite ssh client to the machine running connect-tunnel. You can also emulate a "standard" user-agent: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)"
-P proxy.company.com:8080 -T 22:ssh.example.com:443
connect-tunnel can easily use your proxy credentials to connect outside: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)"
-P proxy.company.com:8080 -T 22:ssh.example.com:443
-A book:s3kr3t
But if you don't want anybody else to connect to your tunnels and through the proxy with your credentials, use the --local-only option: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)"
-P proxy.company.com:8080 -T 22:ssh.example.com:443
-A book:s3kr3t -L
If you have several destinations, there is no need to run several instances of connect-tunnel: connect-tunnel -U "Mozilla/4.03 [en] (X11; I; Linux 2.1.89 i586)"
-P proxy.company.com:8080 -A book:s3kr3t -L
-T 22:ssh.example.com:443
-T 222:ssh2.example.com:443
But naturally, you will need to correctly set up the ports in your clients. Mmm, such a long command line would perfectly fit in an alias or a .BAT file. ;-) ENVIRONMENT VARIABLES
The environment variable HTTP_PROXY can be used to provide a proxy definition. The environment variable is overriden by the --proxy option, if passed to connect-tunnel. AUTHOR
Philippe "BooK" Bruhat, <book@cpan.org>. I seem to have re-invented a well-known wheel with that script, but at least, I hope I have added a few interesting options to it. SCRIPT HISTORY
The first version of the script was a quick hack that let me go through a corporate proxy. Version 0.02 and version 0.03 were released on CPAN in 2003. Version 0.04 sits half-finished in a CVS repository at home: I couldn't decypher the spaghetti of my data structures any more. :-( Version 0.05 (and higher) are based on Net::Proxy, and included with the Net::Proxy distribution. Even though it's not rocket science, connect-tunnel has been cited in at least one academic works: HTTP Tunnels Through Proxies, Daniel Alman Available at SANS InfoSec Reading Room: Covert Channels http://www.sans.org/rr/whitepapers/covert/ Direct link: http://www.sans.org/rr/whitepapers/covert/1202.php COPYRIGHT
Copyright 2003-2007, Philippe Bruhat. All rights reserved. LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
本地备份
127.0.0.1:8080 ss s5 代理地址
客户端 hosts 127.0.0.1 www.qdac.cc 就能直接访问www.qdac.cc 不需要修改svn 连接那么麻烦.
这里-P 127 8080 是代理服务器 3690随意端口这里设置的目的是对应 服务器www.qdac.cc:3690 端口 这样
服务端 connect-tunnel -P 127.0.0.1:8080 -T 3690:www.qdac.cc:3690
GIT 未测试没有这样的项目给我玩.
使用 隧道技术 使用http代理连接 svn:// git://的更多相关文章
- SSH隧道技术----端口转发,socket代理
原文的原始出处不详,本文也是在复制引用了某篇转载,并做了必要的整理与编辑. 本文的受众 如果你遇到了以下问题,那么你应该阅读这篇文章 我听说过这种技术,我对它很感兴趣 我想在家里访问我在公司的机器(写 ...
- 利用SSH隧道技术穿越内网访问远程设备
本文为作者原创,转载请注明出处:https://www.cnblogs.com/leisure_chn/p/11899478.html 通常,我们用于调试的计算机无法远程访问位于局域网中的待调试设备. ...
- 图解再谈ssh port forwarding-ssh隧道技术
https://www.ramkitech.com/2012/04/how-to-do-ssh-tunneling-port-forwarding.html https://www.cnblogs.c ...
- 第11章 拾遗5:IPv6和IPv4共存技术(2)_ISATAP隧道技术
6.3 ISATAP隧道技术 (1)基本概念 ①在一个IPv4网络中主机与路由器之间创建一条ISATAP隧道,以便让该主机可以访问IPv6网络中的资源. ②条件:IPv4中的PC主机需要支持IPv4和 ...
- 使用隧道技术进行C&C通信
一.C&C通信 这里的C&C服务器指的是Command & Control Server--命令和控制服务器,说白了就是被控主机的遥控端.一般C&C节点分为两种,C&a ...
- 迁移IPv6:6To4隧道技术
1. IPv6 路由选择协议 首先要讨论的是RIPng(下一代).RIP非常适合用于小型网络.这正是它没有惨遭淘汰,继续用于 IPV6网络的原因.另外,还有EIGRPv6,因为它有独立于协议的模块,只 ...
- 隧道技术(Tunneling)
隧道技术及其应用 隧道技术(Tunneling)是一种通过使用互联网络的基础设施在网络之间传递数据的方式.使用隧道传递的数据(或负载)可以是不同协议的数据帧或包.隧道协议将其它协议的数据帧或包重新封装 ...
- (转)OpenVPN使用HTTP代理连接服务器
原文地址:http://www.365mini.com/page/18.htm 在一些公司或者其他受限的网络环境中,使用的是HTTP代理服务器上网.在这种情况下,使用OpenVPN客户端可能无法连接服 ...
- 【技术贴】解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法
[技术贴]解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法 错误是:Aborting commit: xxxxx’ remains ...
随机推荐
- HDU5213(容斥定理+莫队算法)
传送门 题意 给出n个数和幸运数k,m次询问,每次询问[l1,r1]和[l2,r2]有多少对数满足x+y=k,x∈[l1,r1],y∈[l2,r2] 分析 看到m只有3e4,可以考虑\(m\sqrt{ ...
- HDOJ1584蜘蛛牌【DFS】
10张牌,大的只能跟小的跑,可以针对每一个状态进行搜索,求一个最小的移动距离. 但是不会怎么遍历整个状态是硬伤? 因为只能大的跟着小的. 先把小的标记,去寻找大的点,最终一定是满足的吧. 比如先标记1 ...
- 洛谷 P3711 仓鼠的数学题【伯努利数+多项式科技】
有个东西叫伯努利数--一开始直接·用第一类斯特林推到自闭 式子来源:https://www.luogu.org/blog/ShadowassIIXVIIIIV/solution-p3711 https ...
- bzoj 1823: [JSOI2010]满汉全席【2-SAT+tarjan】
因为每种食材只有一份,所以两个评委的如果有要求同一种食材的两种做法就是不可行,用这个来建立2-SAT模型 然后跑tarjan判可行性即可 #include<iostream> #inclu ...
- kibana 操作
插入时不指明id,不会自动生成id,和视频中的不一样啊 解决: 其实是可以的,不过put不可以 POST才可以 中文输入有问题: 待解决: 基本操作记录 GET _search { "que ...
- Hexo瞎折腾系列(1) - 准备工作与简单美化
前言 网上有不少相关的帖子,不过版本会比较旧,而不同版本可能存在代码不同的问题,不过大部分还是大同小异,本系列就不啰嗦重复了,基本只会按照本人所使用的版本以及个人所使用到的内容来进行介绍. 该系列是对 ...
- redis查数据
1 连接服务 [root@redis1-20 ~]# telnet 127.0.0.1 6380 Trying 127.0.0.1... Connected to 127.0.0.1. Escape ...
- JAVA学习笔记(一)配置环境
java语言的两种机制: Java 的虚拟机机制(JVM):虚拟机机制保证Java程序的跨平台特性. Java 的垃圾回收机制:垃圾回收机制保证Java程序更安全.更高效. 环境搭配:安装JDK和JR ...
- android动画(3)layout动画,layoutChanged动画及算定义它,ListViewActivity的Layout动画(代码和xm配置两种实现l)
1.layout切换动画 代码: 本示例是fragment切换.在它的oncreateView中 public class LayoutAnimationFrgmt extends Fragment ...
- 165 Compare Version Numbers 比较版本号
比较两个版本号 version1 和 version2.如果 version1 大于 version2 返回 1,如果 version1 小于 version2 返回 -1, 除此以外 返回 0.您可 ...