golemfactory / dapp-runner

GNU Lesser General Public License v3.0
5 stars 6 forks source link

allow configuration of the LocalHTTPProxy #54

Open shadeofblue opened 2 years ago

shadeofblue commented 2 years ago

Allow configuration of the local address

currently, the local addresses from the LocalHTTPProxy are always reported as e.g.:

http://localhost:8081

add a configuration option (in the yaml config file (not the app descriptor)) to allow specification of the address

http_proxy:
    address: "https://my.address.com",

Add local port limits

allow the runner to limit the local ports available to be exposed by the run app:

http_proxy:
    ports:
        - "8080:9090"
        - "10000"

and allow only mappings within the specified ranges when choosing the port in _start_local_proxy

when an app specifies an explicit port outside this range, raise a RunnerError

(+ possibly also move get_free_port to runner.util and also raise a RunnerError when it finds out there are no more available ports)