Previous: Command-line Exclusive Options, Up: Invoking


2.2 Startup Options

Anyone of the following options have a ‘keyword’ form which can be specified in startup file (see Startup File). In this section, every single option is followed by a ‘keyword’.

If you have duplicate options on command line or settings in startup file (see Startup File), only the first one will be used. Anyway, do not let this happen if possible.

-d
debug
Turn on debug output.

Argument after this option is not required and should be completely omitted on command line. If this option exists, the value will be set to 1 automatically.

While in startup file, use ‘debug=1’ to turn on debug output. ‘debug=0’ to disable it. The value is 0 by default.


-t threads
threads
The number of threads opened at the same time. This should be based on the resource avaliable on your system. The number can't be more than 65535. On the other hand, though nocache header is used, running proxyknife with less threads may give more accurate result. Default: 50.


-g user_agent
user_agent
Identified as browsers or other clients. Default: ‘User-Agent: MSIE 6.0


-I proxyknifetype
proxyknifeintype
The mode of input. 0: file mode, 1:url mode. In file mode, proxyknife will regard the value of keyword ‘proxyknifein’ or the argument after option ‘-i’ as filenname; otherwise, in url mode, they are parsed as part of URL. Now only two sites are available in url mode: proxylist.kmip.net/list.html and youth.bupt.edu.cn/proxy/.

By default, proxyknife will read file proxylist in current directory in file mode and fetch proxylist from http://proxylist.kmip.net/list.html in url mode.

Default: 0


-i proxyknifein
proxyknifein
The input filename with full path which proxyknife read proxylist from or the url to the proxylist file. Let it be "-" to read from stdin. In url mode, this value can be ‘proxylist.kmip.net/list.html’ or ‘youth.bupt.edu.cn/proxy/’. I haven't try the other sites. In url mode, proxyknife may connect to the web via myproxy, which is based on the value of ‘mytype’. Default: ‘proxylist’ or ‘proxylist.kmip.net/list.html


-m mytype
mytype
The type of myproxy. If enabled, proxyknife will send all request via it. It should be enabled for lan users after a proxy tunnel. The value can be: 1 (HTTP_CONNECT - http proxy without authentication), 2 (SOCKS5_CONNECT - socks5 proxy without authentication), 5 (SOCKS4_CONNECT - socks4 proxy without authentication), 11 (HTTP_CONNECT_AUTH - http proxy with basic authentication), 12 (SOCKS5_CONNECT_AUTH - socks5 proxy with username/password authentication), 21 (DIRECT - Disabled, connect to testproxy directly). Default: 21


-h myhost
myhost
The IPV4 address or host name of myproxy. This will be in effect only if mytype !=21 Default: NULL1


-p myport
myport
The port of myproxy. This will be used if mytype !=21 Default: NULL


-u myuser
myuser
The username for myproxy. This will be used only if ‘mytype’=11 or 12. Default: NULL


-s mypass
mypass
The password for myproxy. This will be used only if ‘mytype’=11 or 12. Default: NULL


-c checksite
checksite
The site used to check testproxies. Default: ‘http://www.google.com:80/webhp?hl=en


-C checkreqin
checkreqin
The file including the customized request. Default: NULL


-k key
key
The string that should be found in the response after a successful request to the checksite. Default: ‘2006 Google


-r rcvtimeo
rcvtimeo
The socket receiving timeout in seconds. Default: 10


-n sndtimeo
sndtimeo
The socket sending timeout in seconds. Default: 5


-S myconreplysize
myconreplysize
The size of buffer used to store the reply after sending CONNECT request for testproxy to myproxy. This is used for some weird proxies. Please leave it intact if unsure. Default: 256


-T testconreplysize
testconreplysize
The size of buffer used to store the reply after sending CONNECT request for checksite to testproxy. It is only be used when you validate HTTP CONNECT proxies. Just as above, do not change it if unsure. Default: 256


-G testtagreplysize
testtagreplysize
The size of buffer used to store the reply after sending GET request to the checksite. Proxyknife will try to find the key from this buffer. Default: 65535


-H httptestmethod
httptestmethod
The HTTP method sent to the testproxy. The possible values are 0 (HTTP_GET) and 1 (HTTP_CONNECT) now. If you need a HTTP proxy supporting CONNECT, just set it to 1. Default: 0


-5 socks5testmethod
socks5testmethod
The socks5 command used in the interaction with the testproxy. Only 2(SOCKS5_CONNECT) is implemented. You should leave it intact now. Default: 2


-4 socks4testmethod
socks4testmethod
The socks4 command used in the interaction with the testproxy. Only 5(SOCKS4_CONNECT) is implemented. You should leave it intact now. Default: 5


-l logfilename
logfilename
The logfile with full path. If you prefer screen output, use a single ‘.’ (‘.’ is just before <LF>) to leave stderr as it is:
          proxyknife -l .

or add this to startup file:

          logfilename=.

If you want to see it later:

          proxyknife -l ./proxyknife.log

or add this to startup file:

          logfilename=./proxyknife.log

Default: ‘proxyknife.log


-o proxyknifeout
proxyknifeout
The output file with full path. Proxyknife print result to this file. If you do not specify it, proxyknife will use a file named ‘proxyout’ in the current directory. If this file do not exists, proxyknife will creat it. Otherwise, it will be overridden. Default: ‘proxyout


Footnotes

[1] In this section, ‘NULL’ means there is no default value for that keyword.