drop hardcoded ip, add Connection: close
exit from loop after close
make ssl working:

- start ssl after connect
- check CN after connect established
- add CA