Linux下SSH+Firefox

时间:2023-03-09 02:04:49
Linux下SSH+Firefox

Linux下SSH+Firefox 简明FQ攻略

 FQ的软件有很多,楼主原来在Windows下用过Tor(洋葱头)、Puff、freegate等,一般只需要打开FQ软件,简单的设置后就可以FQ浏览了。Linux下我还没用过,google了一下,方法有很多,这里介绍下使用ssh+FirefoxFQ的一种方法。

  ssh的应用之一就是做SOCKS5代理, SOCKS5是一个代理协议,它在使用 TCP/IP协议通讯的终端机器和服务器机器之间扮演一个中介角色,使得内部网中的终端机器变得能够访问Internet网中的服务器,或者使通讯更加安全。SOCKS5 服务器通过将终端发来的请求转发给真正的目标服务器, 模拟了一个终端的行为。在这里,终端和SOCKS5之间也是通过TCP/IP协议进行通讯,终端将原本要发送给真正服务器的请求发送给SOCKS5服务器,然后SOCKS5服务器将请求转发给真正的服务器。

  具体步骤如下:

  第一步,首先需要安装SSH,我用的是CentOS6.2,默认已经安装了SSH,所以pass。

  安装之后,确认SSH服务是否开启:

  [root@localhost ~]# service sshd status
  openssh-daemon (pid 2225) 正在运行...

  (这里可以用service sshd  start/stop/restart 等去改变服务的状态)

  第二步,安装Firefox插件autoproxy。直接在 https://addons.mozilla.org/zh-CN/firefox/addon/autoproxy/ 下载安装,之后点击使用gfwlist策略即可,这个策略是有专人维护的,基本所有常用的被墙网站都列在里面,当然你也可以自定义需要代理的网站,具体方法上面的链接里写的都有。下载安装以后可以在Firefox里看到一个“福”字小标签,如下图所示,它有三种模式:自动、全局、禁用。全局就是为所有访问网站作代理,因为不是访问的所有网站都被墙了,所以很显然没必要,自动就是仅为被墙网站作代理。

  Linux下SSH+Firefox

图1

   根据你用的FQ软件选择默认代理方式,这里显然代理方式为ssh -D。再选择首选项中的编辑服务器,如下图所示,这里默认的是7070端口和socks5代理协议(注意这时还不能浏览墙外网站):

  Linux下SSH+Firefox

图2

  第三步,你需要申请一个ssh账户,在 http://www.cjb.net/cgi-bin/shell.cgi?action=signup 注册一个账户,之后会在你的邮箱里会收到一封确认邮件,点击链接之后等一会儿,会再接收到一封确认邮件,里面包含了你申请的用户名和密码等信息。

  第四步,连接SSH服务器。

  [root@localhost ~]# ssh -qTfnN -D 7070 username@216.194.70.6 (注意这里的username就是你的用户名,7070是端口号)

  接着根据提示,输入你刚才申请账户的密码即可启动服务了。实际上这种方式的FQ是远程登录到作为服务器的主机上,然后借这台能够访问墙外网站的主机访问网页,之后再将信息传递给你。

  OK,Enjoy it~虽然网速不会很快。

  

分类: shell
标签: shell

Mongo DB Study: first face with mongo DB

Mongo DB Study: first face with mongo DB

1.  study methods:

1.  Translate: I am the mongo DB organization website truck man. And I may use my knowledge to help myself learn more.

2.  Practice: only the practice can make me what I have done and what I can do.

2.  Ooh, Mongo Db is an open source (c++) no SQL database. This is what I very like it firstly. Next, with the use of it may make me more like it. Expecting!

3.  Today is the first use with it.

First we should get it:

www.mongodb.org you can get what you want.

I get the 32-bit r-2.4.4(the newer one, and with the information the even number release is more stable) after download the file, extract into the mongo DB directory like this.

Linux下SSH+Firefox

Secondly, I add the mongo into the environment variables; make sure we can use it more quickly with the CMD of the win + R.

Like this:

Linux下SSH+Firefox

Thirdly, let’s try it.

With the CMD, first we should point the database path like this:

Linux下SSH+Firefox

If you see like this:

Linux下SSH+Firefox

Congratulations, you get it. and you can with the IE confirm it.

http://localhost:217017 (mongo use the default port 217017), and you can with the 218017 with more details.

Surely, we can use mongo db now.

With a new CMD. And use command “mongo” start to use the database of mongo.

Insert:

We doesn’t must create a “table”, but we can use the insert method create a collection like this.

Linux下SSH+Firefox

Find:

We may want to see what we have inserted. We can use find like the “select” with SQL to find it out.

Linux下SSH+Firefox

Update:

We may want to update one item of the collection. Like this:

Linux下SSH+Firefox

Remove:

You can remove the item. Like this:

Linux下SSH+Firefox

作者:Janne Lee 
邮箱:JanneLeeMAC@gmail.com 
出处:http://www.cnblogs.com/accipiter/ 
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 
该文章也同时发布在我的独立博客中-Accipter'blog

分类: Mongo DB
标签: mongoDB