summaryrefslogtreecommitdiff
path: root/docs/architecture.md
blob: 51217cc713fedafaa366bc31e0492c9596630203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Title: Architecture of Libproxy
Slug: Architecture


# Architecture

Starting with release 0.5.0 Libproxy is making use of glib. glib has many
advantages and helps to get rid of one of the major issues we have had with
previous versions of Libproxy. To name a few advantages:

- Testing Framework
- Make use of existing plugin loader
- Automatic documentation out of code
- Gobject Introspection bindings for almost every programming language

## Plugin types

Libproxy is using internal plugins to extend it's knowledge about different
configuration options and handling of PAC files. Most of those plugins are
configuration plugins:

- config-env
- config-gnome
- config-kde
- config-osx
- config-sysconfig
- config-windows

Then there is only one pacrunner plugin which handles parsing of JS PAC files:

- pacrunner-duktape

## Configuration plugin priority

Configuration plugins are executed in a specific priority:

- PX_CONFIG_PRIORITY_FIRST (highest)
- PX_CONFIG_PRIORITY_DEFAULT
- PX_CONFIG_PRIORITY_LAST (lowest)

Highest priority is used in `config-env` and lowest priority in
`config-sysconfig`. All the other plugins are running on default priority.

### Configuration plugin enforcement

In case you want to use a specific configuration plugin for a given application,
you are able to overwrite the priority. Therefore set a environment variable
`PX_FORCE_CONFIG=config-name` and libproxy will just use this configuration
plugin.