fix http/ws protocol stuff
make pattern source & dest configurable