Update index.js

add basic support for http_proxy
fix suffix appending