graysign / LibPrivoxy

Use Privoxy as library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

Many people want to integrate Privoxy into their own projects, I made some changes to the Privoxy codes to compiled into a DLL or static library, so that you can better integrate it into their own projects.

Base on work from:
Privoxy: https://www.privoxy.org/ (based on its latest version 3.0.28)
LibPrivoxy: https://github.com/tarolabs/LibPrivoxy
DNS query: https://www.binarytides.com/dns-query-code-in-c-with-winsock/

Develop environment: Visual Studio 2017

License: GNU GENERAL PUBLIC LICENSE Version 2

Author: Shiyu Tang <shiyutang#gmail.com>

Notice: Important changes to original Privoxy:

  1. Use custom DNS servers

You can set DNS servers in config file to use specified DNS servers (of example, 8.8.8.8 and/or 208.67.222.222) instead of system-wide DNS settings. You can add no more than 6 DNS servers. Like:

dns-servers 8.8.8.8;208.67.222.222

Sample code (C#) of using the dll:

public class PrivoxyWrapper {
[DllImport(@"LibPrivoxy.dll")]
public static extern int StartPrivoxy([MarshalAs(UnmanagedType.LPStr)] string configFileFullPath);

[DllImport(@"LibPrivoxy.dll")]
public static extern void StopPrivoxy();

[DllImport(@"LibPrivoxy.dll")]
public static extern int IsRunning();

}

About

Use Privoxy as library.

License:GNU General Public License v2.0


Languages

Language:C 53.9%Language:HTML 29.2%Language:Shell 6.3%Language:Perl 5.4%Language:Roff 3.3%Language:Prolog 0.8%Language:C++ 0.5%Language:Makefile 0.3%Language:CSS 0.3%Language:Awk 0.0%