Skip to content

Commit

Permalink
Creating the Polipo2 fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Brown committed Aug 2, 2017
1 parent 4d42ca1 commit 650de50
Show file tree
Hide file tree
Showing 60 changed files with 532 additions and 489 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
polipo
polipo\.exe
polipo2
polipo2\.exe
core
*.o
polipo.html
polipo.info
polipo2.html
polipo2.info
html/
4 changes: 2 additions & 2 deletions .hgignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax: glob

polipo
polipo.info
polipo2
polipo2.info
core
html
*.o
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Polipo2 1.0:
* Initial fork of Polipo2 from Polipo.

Polipo 1.1.2 (unreleased):

* Implemented support for SOCKS5 authenticatin (thanks to Amir Hossein
Expand Down
3 changes: 2 additions & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2003-2008 by Juliusz Chroboczek
Copyright (c) 2003-2016 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 22 additions & 22 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
Polipo installation instructions
================================
Polipo2 installation instructions
=================================

1. Building and running polipo
------------------------------
1. Building and running polipo2
-------------------------------

$ make all
$ su -c 'make install'
$ man polipo
$ polipo &
$ man polipo2
$ polipo2 &

If you want Polipo to put itself into the background, you may replace
If you want Polipo2 to put itself into the background, you may replace
the last line with:

$ polipo daemonise=true logFile="/var/log/polipo.log"
$ polipo2 daemonise=true logFile="/var/log/polipo2.log"

On SVR4 systems (Solaris, HP/UX), you will need to use one of the
following (whichever works):

$ make PLATFORM_DEFINES=-DSVR4 all
$ make PLATFORM_DEFINES=-DSVR4 LDLIBS='-lsocket -lnsl -lresolv' all

You can also use Polipo without installing:
You can also use Polipo2 without installing:

$ make
$ nroff -man polipo.man | more
$ ./polipo &
$ nroff -man polipo2.man | more
$ ./polipo2 &

For information about building on Windows, please see the file README.Windows.

2. Configuring your user-agent
------------------------------

Once polipo is running, configure your user-agent (web browser) to use
Once polipo2 is running, configure your user-agent (web browser) to use
the proxy on `http://localhost:8123/'. Depending on the user-agent,
this is done either by setting the environment variable http_proxy,
e.g.
Expand All @@ -40,33 +40,33 @@ e.g.

or by using the browser's ``preferences'' menu.

3. Configuring polipo
---------------------
3. Configuring polipo2
----------------------

If you want to use an on-disk cache, you will need to create its root
directory:

$ mkdir /var/cache/polipo/
$ mkdir /var/cache/polipo2/

You should then arrange for cron to run the following on a regular
basis:

killall -USR1 polipo
killall -USR1 polipo2
sleep 1
polipo -x
killall -USR2 polipo
polipo2 -x
killall -USR2 polipo2

If you want to use a configuration file, you should put it in one of
the locations `/etc/polipo/config' or `~/.polipo'; you can also use
the locations `/etc/polipo2/config' or `~/.polipo2'; you can also use
the `-c' flag to put it in a non-standard location. See the file
`config.sample' for an example.

You might also want to create a forbidden URLs file, which you should
put either in one of `/etc/polipo/forbidden' or `~/.polipo-forbidden';
put either in one of `/etc/polipo2/forbidden' or `~/.polipo2-forbidden';
you can set the variable `forbiddenFile' in your config file if you
want to put it in a non-standard location. See `forbidden.sample' for
an example.


Juliusz Chroboczek
<[email protected]>
Originally by Juliusz Chroboczek
Polipo2 fork maintained by Silas S. Brown
64 changes: 32 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man
INFODIR = $(PREFIX)/info
LOCAL_ROOT = /usr/share/polipo/www
DISK_CACHE_ROOT = /var/cache/polipo
LOCAL_ROOT = /usr/share/polipo2/www
DISK_CACHE_ROOT = /var/cache/polipo2

# To compile with Unix CC:

Expand Down Expand Up @@ -72,71 +72,71 @@ OBJS = util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \
http_parse.o parse_time.o dns.o forbidden.o \
md5import.o ftsimport.o socks.o mingw.o

polipo$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o polipo$(EXE) $(OBJS) $(MD5LIBS) $(LDLIBS)
polipo2$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o polipo2$(EXE) $(OBJS) $(MD5LIBS) $(LDLIBS)

ftsimport.o: ftsimport.c fts_compat.c

md5import.o: md5import.c md5.c

.PHONY: all install install.binary install.man

all: polipo$(EXE) polipo.info html/index.html localindex.html
all: polipo2$(EXE) polipo2.info html/index.html localindex.html

install: install.binary install.man

install.binary: all
mkdir -p $(TARGET)$(BINDIR)
mkdir -p $(TARGET)$(LOCAL_ROOT)
mkdir -p $(TARGET)$(LOCAL_ROOT)/doc
rm -f $(TARGET)$(BINDIR)/polipo
cp -f polipo $(TARGET)$(BINDIR)/
rm -f $(TARGET)$(BINDIR)/polipo2
cp -f polipo2 $(TARGET)$(BINDIR)/
cp -f html/* $(TARGET)$(LOCAL_ROOT)/doc
cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html

install.man: all
mkdir -p $(TARGET)$(MANDIR)/man1
mkdir -p $(TARGET)$(INFODIR)
cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1
cp polipo.info $(TARGET)$(INFODIR)/
install-info --info-dir=$(TARGET)$(INFODIR) polipo.info
cp -f polipo2.man $(TARGET)$(MANDIR)/man1/polipo2.1
cp polipo2.info $(TARGET)$(INFODIR)/
install-info --info-dir=$(TARGET)$(INFODIR) polipo2.info


polipo.info: polipo.texi
makeinfo polipo.texi
polipo2.info: polipo2.texi
makeinfo polipo2.texi

html/index.html: polipo.texi
html/index.html: polipo2.texi
mkdir -p html
makeinfo --html -o html polipo.texi
makeinfo --html -o html polipo2.texi

polipo.html: polipo.texi
makeinfo --html --no-split --no-headers -o polipo.html polipo.texi
polipo2.html: polipo2.texi
makeinfo --html --no-split --no-headers -o polipo2.html polipo2.texi

polipo.pdf: polipo.texi
texi2pdf polipo.texi
polipo2.pdf: polipo2.texi
texi2pdf polipo2.texi

polipo.ps.gz: polipo.ps
gzip -c polipo.ps > polipo.ps.gz
polipo2.ps.gz: polipo2.ps
gzip -c polipo2.ps > polipo2.ps.gz

polipo.ps: polipo.dvi
dvips -Pwww -o polipo.ps polipo.dvi
polipo2.ps: polipo2.dvi
dvips -Pwww -o polipo2.ps polipo2.dvi

polipo.dvi: polipo.texi
texi2dvi polipo.texi
polipo2.dvi: polipo2.texi
texi2dvi polipo2.texi

polipo.man.html: polipo.man
rman -f html polipo.man > polipo.man.html
polipo2.man.html: polipo2.man
rman -f html polipo2.man > polipo2.man.html

TAGS: $(SRCS)
etags $(SRCS)

.PHONY: clean

clean:
-rm -f polipo$(EXE) *.o *~ core TAGS gmon.out
-rm -f polipo.cp polipo.fn polipo.log polipo.vr
-rm -f polipo.cps polipo.info* polipo.pg polipo.toc polipo.vrs
-rm -f polipo.aux polipo.dvi polipo.ky polipo.ps polipo.tp
-rm -f polipo.dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html
-rm -f polipo2$(EXE) *.o *~ core TAGS gmon.out
-rm -f polipo2.cp polipo2.fn polipo2.log polipo2.vr
-rm -f polipo2.cps polipo2.info* polipo2.pg polipo2.toc polipo2.vrs
-rm -f polipo2.aux polipo2.dvi polipo2.ky polipo2.ps polipo2.tp
-rm -f polipo2.dvi polipo2.ps polipo2.ps.gz polipo2.pdf polipo2.html
-rm -rf ./html/
-rm -f polipo.man.html
-rm -f polipo2.man.html
34 changes: 13 additions & 21 deletions README
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
Polipo is no longer maintained
==============================

Polipo is no longer maintained. Sorry.


Original Polipo README
======================

Polipo is single-threaded, non blocking caching web proxy that has
Polipo2 is a single-threaded, non blocking caching web proxy that has
very modest resource needs. See the file INSTALL for installation
instructions. See the texinfo manual (available as HTML after
installation) for more information.

Current information about Polipo can be found on the Polipo web page,

http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/

Further inquiries should be sent to the Polipo-users mailing list:

<[email protected]>

Please see the Polipo web page for subscription information.
The original Polipo was developed by Juliusz Chroboczek from
2003 and was maintained by him up until November 2016.

This Polipo2 fork is maintained by Silas S. Brown. It is NOT
intended for general use - as Juliusz said when he stepped
down, caching proxies are becoming obsolete for general use
due to the increasing prevalence of encrypted alternatives to
HTTP that reduce caching proxies to simple relays. If all
you want is a simple relay (for example so your Web traffic
originates from a remote IP address), then you can do better
by using a VPN or a SOCKS5 proxy.

Juliusz Chroboczek
<[email protected]>
Polipo2 is now intended as a drop-in caching layer for
experimental HTTP proxies such as Web Adjuster.
19 changes: 7 additions & 12 deletions README.Windows
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Building Polipo on Windows
==========================
Building Polipo2 on Windows
===========================

There are two distinct ports of Polipo to Windows -- a port using the
There are two distinct ports of Polipo2 to Windows -- a port using the
Cygwin emulation libraries, and an experimental native port using Mingw.

The Cygwin port is identical to the Unix binary. Build it just like
you would build under Unix -- just type ``make all'' in the directory
where you untarred the Polipo sources.
where you untarred the Polipo2 sources.

In order to build the native port, cd to the Polipo directory, and do
In order to build the native port, cd to the Polipo2 directory, and do

make EXE=.exe LDLIBS=-lwsock32

Expand All @@ -23,16 +23,11 @@ to point make at the right compiler:

The native port currently attempts to access files in locations that
are typical for a Unix system; for example, it will attempt to read a
configuration file /etc/polipo/config on the current drive. You will
probably need to point it at your config file with an explicit ``-c''
configuration file /etc/polipo2/config on the current drive. You will
therefore need to point it at your config file with an explicit ``-c''
command-line argument, and define at least the following configuration
variables:

dnsNameServer
diskCacheRoot
forbiddenFile

Help with solving this issue would be very much appreciated.


Juliusz Chroboczek
9 changes: 5 additions & 4 deletions atom.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2003-2006 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,17 +21,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "polipo.h"
#include "polipo2.h"

/* Atoms are interned, read-only reference-counted strings.
Interned means that equality of atoms is equivalent to structural
equality -- you don't need to strcmp, you just compare the AtomPtrs.
This property is used throughout Polipo, e.g. to speed up the HTTP
This property is used throughout Polipo2, e.g. to speed up the HTTP
parser.
Polipo's atoms may contain NUL bytes -- you can use internAtomN to
store any random binary data within an atom. However, Polipo always
Polipo2's atoms may contain NUL bytes -- you can use internAtomN to
store any random binary data within an atom. However, Polipo2 always
terminates your data, so if you store textual data in an atom, you
may use the result of atomString as though it were a (read-only)
C string.
Expand Down
1 change: 1 addition & 0 deletions atom.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2003-2006 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion auth.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2004-2006 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "polipo.h"
#include "polipo2.h"

int
buildClientAuthHeaders(AtomPtr url, char *word,
Expand Down
1 change: 1 addition & 0 deletions auth.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2004-2006 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion chunk.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2003-2006 by Juliusz Chroboczek
Copyright (c) 2017 by Silas S. Brown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "polipo.h"
#include "polipo2.h"

#define MB (1024 * 1024)
int chunkLowMark = 0,
Expand Down
Loading

0 comments on commit 650de50

Please sign in to comment.