lots of ssl proxy fixes