Plugin Directory

Changeset 2284151


Ignore:
Timestamp:
04/15/2020 01:46:57 PM (6 years ago)
Author:
onionbazaar
Message:

update 1.0 to 1.1

Location:
tor-router
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • tor-router/trunk/readme.txt

    r2267773 r2284151  
    22Plugin Name:    Tor Router
    33Plugin URI: https://wordpress.org/plugins/tor-router/
    4 Version:    1.0
     4Version:    1.1
    55Author:     OnionBazaar
    66Author URI: http://onionbazaar.org
    77Contributors: OnionBazaar
    88Requires at least: 2.8
    9 Tested up to: 5.3.2
     9Tested up to: 5.4
    1010Stable tag: trunk
    1111License:    GNU General Public License v3.0
    1212License URI:    http://www.gnu.org/licenses/gpl-3.0.html
    1313
    14 Routes outgoing traffic through Tor or any HTTP Proxy.
     14Routes outgoing traffic through Tor or any HTTP / SOCKS Proxy.
    1515
    1616
    1717== Description ==
    1818
    19 Tor Router directs all connections through a HTTP Proxy. Use this plugin in case your network requires a Proxy for outgoing traffic, or if you want to anonymize it via Tor.
     19Tor Router directs all connections through a HTTP/SOCKS Proxy. Use this plugin in case your network requires a Proxy for outgoing traffic, or if you want to anonymize it via Tor.
    2020
    2121To check if the routing works properly, there is a button "Check IP" in the Tor Router settings. This connects to the 3rd party website https://icanhazip.com (terms of service: https://major.io/icanhazip-com-faq) to display your external IP.
     
    27272. Activate Tor Router through the 'Plugins' menu in WordPress.
    28283. Open `Settings` -> `Tor Router` to setup the plugin.
    29 4. To route through Tor, add "HTTPTunnelPort 9080" to your torrc - file
     294. To route through Tor you need to have it installed on your server (apt-get install tor / yum install tor)
    3030
    3131
     
    3333
    34341. View of Tor Router Settings
     35
     36
     37== Changelog ==
     38
     39#### 1.1
     40
     41Added SOCKS functionality
     42
     43#### 1.0
     44
     45The management and development of the plugin is done by [OnionBazaar](https://onionbazaar.org)
  • tor-router/trunk/tor-router.php

    r2267773 r2284151  
    33Plugin Name: Tor Router
    44Plugin URI: https://wordpress.org/plugins/tor-router/
    5 Description: Routes outgoing traffic through Tor or any HTTP Proxy.
    6 Version: 1.0
     5Description: Routes outgoing traffic through Tor or any HTTP / SOCKS Proxy.
     6Version: 1.1
    77Author: OnionBazaar
    88Author URI: http://onionbazaar.org
     
    2323function obztorrouter_register_settings() {
    2424   add_option( 'obztorrouter_enabled', '1');
     25   add_option( 'obztorrouter_socks', '1');
    2526   add_option( 'obztorrouter_host', 'localhost');
    26    add_option( 'obztorrouter_port', '9080');
     27   add_option( 'obztorrouter_port', '9050');
    2728   register_setting( 'obztorrouter_options_group', 'obztorrouter_enabled' );
     29   register_setting( 'obztorrouter_options_group', 'obztorrouter_socks' );
    2830   register_setting( 'obztorrouter_options_group', 'obztorrouter_host' );
    2931   register_setting( 'obztorrouter_options_group', 'obztorrouter_port' );
     
    7375    <td width="400" ><input type="checkbox" name="obztorrouter_enabled" id="obztorrouter_enabled" value="1" ';
    7476    checked('1', get_option('obztorrouter_enabled'));
    75     echo '/> <label for="obztorrouter_enabled">Route traffic through the following HTTP Proxy</label>
     77    echo '/> <label for="obztorrouter_enabled">Route traffic through the following Proxy</label>
     78    </td>
     79    </tr>
     80    <tr><td colspan="2"><br></td></tr>
     81    <tr>   
     82    <tr>
     83    <td width="150" valign="top">SOCKS Mode</td>
     84    <td width="400" ><input type="checkbox" name="obztorrouter_socks" id="obztorrouter_socks" value="1" ';
     85    checked('1', get_option('obztorrouter_socks'));
     86    echo '/> <label for="obztorrouter_socks">Use SOCKS instead of HTTP Proxy</label>
    7687    </td>
    7788    </tr>
     
    89100    </tr>
    90101    <tr><td colspan="2"><br></td></tr>
    91     <tr><td colspan="2"><p>To activate the HTTP Proxy Server feature in Tor, you need to add "HTTPTunnelPort 9080" to your Tor configuration file (torrc)</p></td></tr>
     102    <tr><td colspan="2"><p>To route through Tor, you need to have it installed on your server (apt-get install tor / yum install tor), activate <i>SOCKS Mode</i> and set the host to <i>localhost</i> and the port to <i>9050</i></p></td></tr>   
    92103    </table>';
    93104    submit_button();
     
    109120if (get_option('obztorrouter_enabled')=='1') {
    110121    if ( ( !defined( 'WP_PROXY_HOST' ) ) AND ( !defined( 'WP_PROXY_PORT' ) ) ) {
    111         define('WP_PROXY_HOST', get_option('obztorrouter_host'));
     122        if (get_option('obztorrouter_socks')=='1') {
     123            $obztorrouter_host = 'socks://'.get_option('obztorrouter_host');
     124        }
     125        else {
     126            $obztorrouter_host = get_option('obztorrouter_host');
     127        }
     128        define('WP_PROXY_HOST', $obztorrouter_host);
    112129        define('WP_PROXY_PORT', get_option('obztorrouter_port'));
    113130    }
Note: See TracChangeset for help on using the changeset viewer.