Skip to content

Commit 2f1b2d9

Browse files
author
Stanislas Polu
committed
Updated Docs
1 parent c21cade commit 2f1b2d9

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

docs/api/session.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,48 @@ Adds the specified url to the list of visited links for this session
2020

2121
Clears the visited links storage for this session
2222

23-
#### Accessor: `off_the_record`
23+
#### Method: `proxy_set`
24+
25+
- `rules` proxy rules string
26+
27+
Sets the specified proxy rules (as string) for the current session
28+
29+
```
30+
proxy-uri = [<proxy-scheme>"://"]<proxy-host>[":"<proxy-port>]
31+
proxy-uri-list = <proxy-uri>[","<proxy-uri-list>]
32+
url-scheme = "http" | "https" | "ftp" | "socks"
33+
scheme-proxies = [<url-scheme>"="]<proxy-uri-list>
34+
proxy-rules = scheme-proxies[";"<scheme-proxies>]
35+
```
36+
37+
For example:
38+
```
39+
"http=foopy:80;ftp=foopy2" -- use HTTP proxy "foopy:80" for http://
40+
URLs, and HTTP proxy "foopy2:80" for
41+
ftp:// URLs.
42+
"foopy:80" -- use HTTP proxy "foopy:80" for all URLs.
43+
"foopy:80,bar,direct://" -- use HTTP proxy "foopy:80" for all URLs,
44+
failing over to "bar" if "foopy:80" is
45+
unavailable, and after that using no
46+
proxy.
47+
"socks4://foopy" -- use SOCKS v4 proxy "foopy:1080" for all
48+
URLs.
49+
"http=foop,socks5://bar.com -- use HTTP proxy "foopy" for http URLs,
50+
and fail over to the SOCKS5 proxy
51+
"bar.com" if "foop" is unavailable.
52+
"http=foopy,direct:// -- use HTTP proxy "foopy" for http URLs,
53+
and use no proxy if "foopy" is
54+
unavailable.
55+
"http=foopy;socks=foopy2 -- use HTTP proxy "foopy" for http URLs,
56+
and use socks4://foopy2 for all other
57+
URLs.
58+
```
59+
60+
#### Method: `proxy_clear`
61+
62+
Clears the proxy rules string for this session
63+
64+
#### Accessor: `is_off_the_record`
2465

2566
Returns whether the session is off the record or not
2667

0 commit comments

Comments
 (0)