内容简介:之前公众号上有人说,我回大陆了会有一波科学上网的教程,今天的推文算一个吧。真的是被你们言中了!做为Bioconductor包作者,而代理其实也挺恼火的,因为各种协议啊,你要各种设置啊,
之前公众号上有人说,我回大陆了会有一波科学上网的教程,今天的推文算一个吧。真的是被你们言中了!
做为Bioconductor包作者,而 git push
传代码到Bioconductor上是被封的。这很是恼火,随着10月份将迎来新一版本的Bioconductor发布,不能够push代码是多么惨的一件事。
代理其实也挺恼火的,因为各种协议啊,你要各种设置啊, http/https/ssh/git
都是各种配置,其实我只要有一个 socks5
的代理,然后你们所有需要走代理的程序都通过它就好了。
谁特么有空天天在琢磨怎么配置各种不同协议的代理!只要我们想得到的,一般都有人做了。
于是万能的github上找到了 proxychains
, https://github.com/haad/proxychains
。
A hook preloader that allows to redirect TCP traffic of existing dynamically linked programs through one or more SOCKS or HTTP proxies
它强制给定程序发起的TCP连接通过事先配置的代理。可以涵盖所有需要代理的情景。就以git为例,没有proxychains的话,就必须为每个协议( https
, git
, ssh
)按照git文档的要求分别设置代理,过程复杂且不稳定。有了 proxychains
,这些完全可以不用管,当然应用场景不限于 git
,任何一个需要代理的命令行程序都是一样在运行的指令前面加 proxychains
完事。
Arch安装很容易:
yay -S proxychains-ng
安装之后,打开 /etc/proxychains.conf
,注释掉下面这行(disable远程DNS解析,有DNS污染风险)。 proxy_dns
最后添加如下行: socks5 127.0.0.1 32997
上面这个代理是我自己机器上跑了某著名软件,用于每日科学上网。
我平时是同时 push
到Bioconductor和github上的,所以我不会跑完一个 git push
再跑一个,而是写在 Makefile
里,自动化这个过程,我只需要 make push
指令就OK。
所以此处我用的指令是:
proxychains make push
这样就加了代理。
$ proxychains make push #### #### 实际的指令,有两条,分别push到两个服务器 #### [proxychains] config file found: /etc/proxychains.conf [proxychains] preloading /usr/lib/libproxychains4.so [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 git push upstream master;\ git push origin master #### #### 第一条指令,push到Bioconductor #### [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] Strict chain ... 127.0.0.1:32997 ... 34.192.48.227:22 ... OK [proxychains] DLL init: proxychains-ng 4.13 Enumerating objects: 56, done. Counting objects: 100% (56/56), done. Delta compression using up to 4 threads Compressing objects: 100% (34/34), done. Writing objects: 100% (41/41), 4.87 KiB | 4.87 MiB/s, done. Total 41 (delta 32), reused 11 (delta 7) To git.bioconductor.org:packages/ggtree.git c372741..e84c1f7 master -> master #### #### 第二条指令,push到github #### [proxychains] DLL init: proxychains-ng 4.13 [proxychains] DLL init: proxychains-ng 4.13 [proxychains] Strict chain ... 127.0.0.1:32997 ... 192.30.253.112:22 ... OK [proxychains] DLL init: proxychains-ng 4.13 Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 4 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 843 bytes | 843.00 KiB/s, done. Total 6 (delta 5), reused 0 (delta 0) remote: Resolving deltas: 100% (5/5), completed with 5 local objects. To github.com:GuangchuangYu/ggtree.git 92847e8..e84c1f7 master -> master
整个世界清静了,没法 push
到 Bioconductor
困扰我多时。而且经过了这个事件,以后打命令,只要需要代理的,都可以直接加 proxychains
搞定了,没有各种配置的烦恼。
以上所述就是小编给大家介绍的《一次解决所有代理问题》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据挖掘中的新方法:支持向量机
邓乃扬、田英杰 / 科学出版社 / 2004-6-10 / 53.00元
支持向量机是数据挖掘中的一个新方法。支持向量机能非常成功地处理回归问题(时间序列分析)和模式识别(分类问题、判别分析)等诸多问题,并可推广于预测和综合评价等领域,因此可应用于理科、工科和管理等多种学科。目前国际上支持向量机在理论研究和实际应用两方面都正处于飞速发展阶段。希望本书能促进它在我国的普及与提高。 本书对象既包括关心理论的研究工作者,也包括关心应用的实际工作者。对于有关领域的具有高等......一起来看看 《数据挖掘中的新方法:支持向量机》 这本书的介绍吧!