1. Import the ca. CRT certificate on the Linux/Ubuntu platform.
1.1. First install the libnss3-tools: sudo apt-Get install libnss3-tools.
1.2. import Certificate: certutil-d SQL: $ home /. PKI/nssdb-a-t "C,"-N wallproxy-I "/path/to/CA. CRT"
1.3. list all certificates: certutil-d SQL: $ home/. PKI/nssdb-l
1.4. View certificate details: certutil-d SQL: $ home/. PKI/nssdb-l-N wallproxy
1.5. Delete certificate: certutil-d SQL: $ home/. PKI/nssdb-D-N wallproxy
2. Generate a log file.
The running of startup. py in Linux does not properly record the log. Here we will improve the logging function of startup. py.
#! /Usr/bin/ENV python2import sys, OS, OS. path as ospath # OS. environ ['Disable _ gevent'] = '1' dir = ospath. dirname (sys. argv [0]) sys. path. insert (0, ospath. abspath (ospath. join (Dir, 'src.zip ') del sys, OS, ospath, dir #========================== logging ========== ====================## added by ifantasticme # Log File ifantastic. logs are recorded in the same directory. The log file size cannot exceed 10 MB and three backups are performed. Import loggingimport osfrom logging import handlersclass stdlogger (object): "" Listen to SYS. stdout and SYS. stderr. "def _ init _ (self, logger = none, level = logging. debug): Self. logger = logging. getlogger () If logger is none else logger self. level = level import sys. stdout = self sys. stderr = self def write (self, message): Message = message. strip () If message: Self. logger. log (self. level, message) log = OS. path. join (OS. path. dirname (_ file _), 'ifantastic. log') Logger = logging. getlogger () handler = handlers. rotatingfilehandler (log, maxbytes = 10*(1024 ** 2), backupcount = 3) logging. basicconfig (Level = logging. debug) Logger. addhandler (handler) std_logger = stdlogger (logger) #===================================================== ====================================== from proxy import mainmain ()