Project

General

Profile

« Previous | Next » 

Revision 591c48a6

Added by jahoti about 2 years ago

Make test suite mildly usable

Allow test/server.py to be run as a command and add some "webpages" for it.

View differences:

test/proxy_core.py
5 5
"""
6 6
The core for a "virtual network" proxy
7 7

  
8
Be sure to run this inside your intended certificates directory.
8
Be sure to set certdir to your intended certificates directory before running.
9 9
"""
10 10

  
11 11
import os, socket, ssl, subprocess, sys, threading, time
......
20 20

  
21 21
class ProxyRequestHandler(BaseHTTPRequestHandler):
22 22
	"""Handles a network request made to the proxy"""
23
	certdir = ''
24
	
25 23
	def log_error(self, format, *args):
26 24
		# suppress "Request timed out: timeout('timed out',)"
27 25
		if isinstance(args[0], socket.timeout):

Also available in: Unified diff