Use Privoxy to convert Shadowsocks to HTTP proxy in Linux

Source: Internet
Author: User
Tags android sdk manager

We all know that Shadowsocks only provides SOCKS5 proxies, not HTTP proxies, and many software offers only HTTP proxy support, such as the need to use shell command line to help the wall, or use Git to sync the source code of Android, or update the Android SDK, what do we do?

Old Gao here introduces a software privoxy, it can act as agent for us to solve the above problems!

Privoxy is a non-caching Web proxy with advanced filtering capabilities for enhancing privacy, modifying Web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can is customized to suit individual and needs. It has application for both stand-alone systems and multi-user networks.
From the introduction, Privoxy function can be far more than the HTTP proxy so simple!

Tutorial Scenario:

The old high router brushes the openwrt and installs the Shadowsocks to provide the SOCKS5 Proxy service on port 1080, now we use Privoxy to convert it to an HTTP proxy.

I. Installation

Log on to the router first

SSH root@192.168.1.1
root@192.168.1.1 ' s Password:


BusyBox v1.22.1 (2015-06-06 07:53:28 CST) built-in shell (ASH)
Enter ' help ' for a list of built-in commands.


_______________________________________________________________
| ____                 _                 ____               |
|  | _ \ __ _ _ __   __| | ___  _ __ __ _| __ )  _____  __   |
| | |_) / _` | '_ \ / _` |/ _ \|  '__/ _` | _ \ / _ \ \/ /   |
|  | __/ (_| | | | | (_| | (_) | | | (_| | |_) | (_) > < |
|   |_|  \__,_|_| |_|\__,_|\___/|_| \__,_|____/ \___/_/\_\   |
| |
| Pandorabox SDK Platform |
| The Core of Smartrouter |
| Copyright 2013-2015 d-team Technology co.,ltd.sz |
| http://www.pandorabox.org.cn |
|______________________________________________________________|
Base on OpenWrt BARRIER breaker (14.09, r1018)
[root@pandorabox:/root]#
Privoxy on the router installation is very simple, a line of code can be done!

Opkg Install Privoxy
If you are prompted not to find the installation package, you can refer to the Millet router Mini Toss the configuration opkg opkg configuration.

Other platforms can be installed using the Yum apt-get command

If not, please go to the official installation package download address

II. Configuration

Privoxy's configuration file is located in/etc/privoxy/config, and down we use vim to edit it.

Pay attention to old high notes!

Vim/etc/privoxy/config


# so many configurations! Looks like Privoxy has a powerful function.
Confdir/etc/privoxy
Logdir/var/log
Filterfile Default.filter
LogFile Privoxy
Actionsfile Match-all.action # Actions that are are applied to all sites and maybe overruled on.
Actionsfile default.action # Main actions file
#actionsfile user.action # User Customizations

# The Listener port is 8118, and if additional device access is required, you need to change IP to the IP 192.168.1.1 or 0.0.0.0 of the router or direct: 8118
Listen-address 192.168.1.1:8118
Toggle 1
Enable-remote-toggle 1
Enable-remote-http-toggle 0
Enable-edit-actions 1
Enforce-blocks 0
Buffer-limit 4096
Forwarded-connect-retries 0
Accept-intercepted-requests 0
Allow-cgi-request-crunching 0
Split-large-forms 0
Keep-alive-timeout 300
Socket-timeout 300
Permit-access 192.168.1.0/24
Debug 1 # Show each get/post/connect request
Debug 4096 # Startup banner and warnings
Debug 8192 # Errors-*we highly recommended enabling this*
#admin-address privoxy-admin@example.com
#proxy-info-url http://www.example.com/proxy-service.html

# as our SS runs on port 1080, we add the following configuration and don't forget the last point.
forward-socks5/127.0.0.1:1080.
Configure proxy settings So we can reboot the Privoxy.

The simplest use is the switchyomega extension under Chrome, we follow the following figure configuration
Then enable the HTTP proxy in the browser, as shown in the following figure
Perfect run!
Now that we have an HTTP wall agent running on port 8118, what do we want to do with the terminal wall?
Add the following code to it ~/.bashrc !
export http_proxy=http://192.168.1.1:8118
export https_proxy=http://192.168.1.1:8118
Iv. Troubleshooting SDK Updates
After preparing the HTTP proxy, we will install the Android SDK Manager as follows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.