Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Update WebProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellurgero committed Nov 11, 2016
1 parent e067bd1 commit 8e1a01a
Show file tree
Hide file tree
Showing 50 changed files with 4,392 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.php
Expand Up @@ -166,6 +166,7 @@ function body(){
<li><a href="#" onclick="pageLoad('PiVPN');"><i class="fa fa-lock fa-fw"></i> PiVPN Profiles</a></li>
<li><a href="#" onclick="pageLoad('Samba');"><i class="fa fa-folder fa-fw"></i> Samba Shares</a></li>
<li><a href="#" onclick="pageLoad('users');"><i class="fa fa-users fa-fw"></i> Users</a></li>
<li><a href="#" onclick="pageLoad('webproxy');"><i class="fa fa-dashboard fa-fw"></i> Web Proxy</a></li>
</ul>
</li>
<li>&nbsp;</li>
Expand Down
6 changes: 6 additions & 0 deletions page.php
Expand Up @@ -59,6 +59,9 @@
case "check":
check();
break;
case "webproxy":
webproxy();
break;
default:
echo "404 - Page not found!";
break;
Expand Down Expand Up @@ -122,4 +125,7 @@ function samba(){
function check(){
include('pages/check.php');
}
function webproxy(){
include('pages/webproxy.php');
}
?>
27 changes: 27 additions & 0 deletions pages/webproxy.php
@@ -0,0 +1,27 @@
<?php
//Check for valid session:
session_start();
include('app/functions.php');
if(!isset($_SESSION['username'])){
die("You must be logged in to view this page!");
}
echo '';
?>
<style>
.frame {
display: block;
width: 100vw;
height: 75vh;
max-width: 100%;
margin: 0;
padding: 0;
border: 0 none;
box-sizing: border-box;
}
</style>
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Web Proxy <small><a href="#"><div onClick="pageLoad('webproxy');" class="fa fa-refresh rotate"></div></a></small></h1>
<iframe src="webproxy/index.php" class="frame"></iframe>
</div>
</div>
Empty file added pages/wp.php
Empty file.
22 changes: 22 additions & 0 deletions webproxy/LICENSE
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

35 changes: 35 additions & 0 deletions webproxy/README.md
@@ -0,0 +1,35 @@
# php-proxy-app
Web Proxy Application built on [**php-proxy library**](https://github.com/Athlon1600/php-proxy) ready to be installed on your server

![alt text](http://i.imgur.com/KrtU5KE.png?1 "This is how PHP-Proxy looks when installed")

## Installation

Keep in mind that this is a **project** and not a library. Installing this via *require* would do you not good.
A project such as this, should be installed straight into the public directory of your web server.

```bash
composer create-project athlon1600/php-proxy-app:dev-master /var/www/
```

If you do not have composer or trying to host this application on a **shared hosting**, then download a pre-installed version of this app as a ZIP archive from [**www.php-proxy.com**](https://www.php-proxy.com/)

## Keep it up-to-date

Application itself rarely will change, vast majority of changes will be done to its requirement packages like php-proxy. Simply call this command once in a while to make sure your proxy is always using the latest versions.

```
composer update
```

#### config.php

This file will be loaded into the global Config class.

#### /templates/

This should have been named "views", but for historic purposes we keep it as templates. What this is...

#### /plugins/

PHP-Proxy has many of its native plugins, but users are free to write their own which could then be loaded from this very folder. See /plugins/TestPlugin.php for an example.
16 changes: 16 additions & 0 deletions webproxy/composer.json
@@ -0,0 +1,16 @@
{
"name": "athlon1600/php-proxy-app",
"type": "project",
"license": "MIT",
"description": "Web proxy application project powered by PHP-Proxy library",
"keywords": ["php proxy application", "php proxy web", "proxy script", "php web proxy", "web proxy"],
"homepage": "https://www.php-proxy.com/",
"require": {
"athlon1600/php-proxy": "dev-master"
},
"scripts": {
"post-create-project-cmd": [
"php -f setup.txt"
]
}
}
121 changes: 121 additions & 0 deletions webproxy/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions webproxy/config.php
@@ -0,0 +1,53 @@
<?php

// all possible options will be stored
$config = array();

// a unique key that identifies this application - DO NOT LEAVE THIS EMPTY!
$config['app_key'] = 'Ii*!2w#sF0T%#mm0fdcgCKrwvBnl1Qj41PlYq@@lkR93yZwZPwwIjm@oDUJ29ywd';

// a secret key to be used during encryption
$config['encryption_key'] = 'bF!Yrm6AO^SsN$jAurk%rAOCVprd4p38QDP8uzdmA0&Rz4sPS@a6wpirCkkqx%D7';

/*
how unique is each URL that is generated by this proxy app?
0 - no encoding of any sort. People can link to proxy pages directly: ?q=http://www.yahoo.com
1 - Base64 encoding only, people can hotlink to your proxy
2 - unique to the IP address that generated it. A person that generated that URL, can bookmark it and visit it and any point
3 - unique to that session and IP address - URL no longer valid anywhere when that browser session that generated it ends
*/

$config['url_mode'] = 1;

// plugins to load - plugins will be loaded in this exact order as in array
$config['plugins'] = array(
'HeaderRewrite',
'Stream',
// ^^ do not disable any of the plugins above
'Cookie',
'Proxify',
'UrlForm',
// site specific plugins below
'Youtube',
'DailyMotion',
'RedTube',
'Twitter'
);

// additional curl options to go with each request
$config['curl'] = array(
// CURLOPT_INTERFACE => '123.123.123.13',
// CURLOPT_CONNECTTIMEOUT => 5
);

//$config['replace_title'] = 'Google Search';

//$config['error_redirect'] = "https://unblockvideos.com/#error={error_msg}";
//$config['index_redirect'] = 'https://unblockvideos.com/';

// $config['replace_icon'] = 'icon_url';

// this better be here other Config::load fails
return $config;

?>

0 comments on commit 8e1a01a

Please sign in to comment.