2020-05-08 10:53:12 +00:00
|
|
|
import bottle
|
|
|
|
import random
|
|
|
|
|
|
|
|
|
2020-05-20 16:01:05 +00:00
|
|
|
@bottle.route('/hostname')
|
2020-05-08 10:53:12 +00:00
|
|
|
def index():
|
|
|
|
if random.randrange(2) == 0:
|
|
|
|
return 'proxy1'
|
|
|
|
else:
|
|
|
|
return 'proxy2'
|
|
|
|
|
|
|
|
|
|
|
|
bottle.run(host='0.0.0.0', port=8080)
|