Glype Web代理架设

web代理与我们通常熟知的HTTP代理、SOCKS代理其实有很大的区别。但对于用户而言,它们的作用都是获取数据然后返回给用户。web代理的特点是它只能在浏览器中使用,并且只能通过它代理获取网页。因为web代理实际上是一个web应用程序,它和其它的网页实质上是一样的,只不过它的唯一功能就是接受用户输入网址,然后显示在浏览器窗口中。作为web应用程序,web代理不需要更改浏览器的选项,只需要把它作为一个网站访问它就可以了。

本文介绍比较主流易用的免费web代理程序:Glype,Phpproxy 

Glype

Glype功能强大,界面美观。
Glype的安装很简单,下载源码包后,解压把其中的upload文件夹上传到空间目录下,即可使用。如: http://domain.com/upload/ 。你可以把upload改个名字或者直接把里面的文件全都传到空间根目录下。此外,如果你需要管理和配置Glype,你应当把extra目录下的”admin.php”上传到刚才的源码目录下。然后访问: http://domain.com/upload/admin.php

Glype

它有以下特点:
即插即用 - 不需要安装,上传到空间即可直接使用
管理员管理面板 易于管理和配置
服务器端缓存 提高访问速度并且减少空间流量
javascript支持 减少原始网页的失真度
简单的主题系统 个性化你的网站
访问控制 允许你为站点设置白名单/黑名单
禁止特定IP 可以禁止单个IP或者IP断,防止站点被滥用
独特的URL 提供了更好的保密性,一旦会话中止,所以存在历史记录中的URL都失效
插件支持 使你可以对一些网站进行优化,比如YouTube
虚拟浏览器 可以使你自定义user-agent,甚至可以让你的连接进入另一个代理服务器

Glype下载地址和版权限制
PHP代理程序Glype,功能强大,适用范围广泛,最重要的是程序持续在更新。但Glype对国内用户不友好,官网限制国内网络访问,而且程序本身有版权限制(对网站的主页做了限制,必须链接到Glype官网)。Glype更新到v1.4.10后的去版权方法也小有更新。

Glype下载地址
Glype官网
https://www.glype.com/
国内网络访问被Blocked.com限制:

但最新程序下载地址却可以直接使用:
https://www.glype.com/download.php

Glype版权限制
This installation of the Glype™ software is being used on a domain name which incorporates a trademark (or a slight variation of a trademark). It is a violation of the Glype Software License Agreement to utilize the Glype software in any manner that may infringe any rights (including, but not limited to, any copyright, trademark or other intellectual property rights) of Glype or any third party.

其中一种方法:

删除/includes/init.php的“function render($b)……return $b;}”;
删除index.php的“# Start the output buffer ob_start('render');”(v1.4.10新增)。

个人推荐用Glype架设你的代理站点。如果你不喜欢Glype或者它不能完成一些特定的功能,那就试试接下来的吧

PhpProxy

PhpProxy大概是国人使用最广泛的web代理程序了。它的源码压缩包只有22k!喜欢简洁的朋友可以试试它. 它的特点是可以指定额外的代理服务器

安装的方法和Glype类似,把解压后的文件上传到空间目录,然后在浏览器里访问即可。

phpproxy

功能列表(version 2.1):
1.支持图象显示。
2.可以向服务器get,post数据,可以传递cookie。现在支持上传文件。
3.支持http,https协议,但 https 需要 php 安装 openssl 模块。
4.支持代理服务器设置。
5.增加了配置文件,更易于设置各项功能,可以开放phpproxy,也可仅指向某个网页。

-------------------------------------------------------------------------------- | GLYPE PROXY PACKAGE CONTENTS -------------------------------------------------------------------------------- This package contains the source code files for the script, a control panel for managing your proxy site and a number of the additional files to help with customizing your proxy. /extras/ - admin.php | This script provides a user-friendly interface for editing your settings. | Upload it to your root proxy directory and run it in your web browser. | You can then follow the instructions displayed to customize your proxy. - cookies.php | This file displays a list of proxified cookies stored on the users computer | and allows the user to delete individual or all cookies. - disclaimer.php | This file displays a stock disclaimer to the user. - edit-browser.php | This allows the user to customize the "virtual browser". You can edit the | user agent and referrer, and choose another proxy to tunnel through. - privacy.php | This file displays a stock privacy policy to the user. - terms.php | This file displays a stock terms of use to the user. - full.main.js | An uncompressed version of the proxy javascript. You will only need this if | want to modify the includes/main.js file. Install: simply copy the file(s) to your root proxy folder. For user-accessible pages, you will need to edit your theme to create links to the extra pages. /upload/ - * | The contents of this folder must be uploaded to your server for the proxy to function. | This folder contains all the source code files for the script.
1.将此文件夹上传到网站根目录 2.打开自己站点网址,如:example.com,或loaclhost 3.第一次安装时打开网址:example.com/admin.php和example.com/mobile/admin.php登记管理员信息,因为移动版实则是另一套Glype程序,所以需要登记两次管理员信息,且互相独立 4.开始自由网上冲浪 注意事项: 1.PC/移动端调转依据Apache的.htaccess文件进行判别,安装时注意确认.htaccess已覆盖。 2..htaccess文件需要依据自己网站进行修改: RewriteEngine on # Uncomment the following lines to force HTTPS # WordPress Defaults RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos|UCBrowser|QQBrowser|wap|Nokia|Lumia|Windows Phone|Windows 10 Mobile|Windows Mobile" [NC] RewriteRule ^$ http://cc.bigxd.com/mobile/ [R=301,L] 最后一行,cc.bigxd.com换成自己站点的网址 3.如果无法支持Apache的Rewrite功能,如使用的是IIS服务,请参照修改相应规则 4.实在无法通过服务器配置实现PC/移动版调转,请将/themes/default下的main-back.php编辑修改 在第8行开始的JS代码中: var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire"); var browser = navigator.userAgent.toLowerCase(); var isMobile = false; for (var i=0; i<mobileAgent.length; i++){ if (browser.indexOf(mobileAgent[i])!=-1){ isMobile = true; //alert(mobileAgent[i]); location.href = '手机网址'; break; } } 修改手机网址为自己的站点手机站目录,如http://example.com/mobile 然后将main-back.php文件名修改为main.php文件,替换原来的main.php文件 5.使用页面JS代码实现的跳转效率较低,需要的时间更长,故默认不使用JS代码来实现跳转 6.移动版的Google搜索失效,这是Glype程序本身与google适配的问题,暂未解决 7.要实现国外代理时一定要确定自己的服务器在境外,且服务器能够访问相应网站 8:已做好全站前台,后台汉化,但访问部分源网站时由于源网站默认的不是UTF编码,使得Glype的工具栏文字乱码,不影响使用,页面编码正常 本代码由戏子醉友情提供,相关支持请在博客留言: http://www.bigxd.com http://cc.bigxd.com
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值