Config.js and multiple bosh


I would like to configure config.js or nginx in order to do that :
when the client is in local network, config.js points to bosh: ‘//
when the client is outside network, config.js points to bosh: ‘//domainename/http-bind’

Is it possible ?
Best regards

Please take this with caution, and maybe someone will contradict me. Anyways: the instance I run here just uses

    bosh: '/http-bind',

in config.js, so it would not make a difference from which network you connect.

It works fine !
Thank you very much !