diff --git a/docs/osmo-smdpp.rst b/docs/osmo-smdpp.rst index ab7cc825..0eab290f 100644 --- a/docs/osmo-smdpp.rst +++ b/docs/osmo-smdpp.rst @@ -92,10 +92,20 @@ The `smdpp-data/upp` directory contains the UPP (Unprotected Profile Package) us commandline options ~~~~~~~~~~~~~~~~~~~ -osmo-smdpp currently doesn't have any configuration file or command line options. You just run it, -and it will bind its plain-HTTP ES9+ interface to local TCP port 8000. +Typically, you just run it without any arguments, and it will bind its plain-HTTP ES9+ interface to +`localhost` TCP port 8000. +osmo-smdpp currently doesn't have any configuration file. +There are command line options for binding: + +Bind the HTTP ES9+ to a port other than 8000:: + + ./osmo-smdpp.py -p 8001 + +Bind the HTTP ES9+ to a different local interface:: + + ./osmo-smdpp.py -H 127.0.0.1 DNS setup for your LPA ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/osmo-smdpp.py b/osmo-smdpp.py index 351787e3..9328b99b 100755 --- a/osmo-smdpp.py +++ b/osmo-smdpp.py @@ -581,15 +581,15 @@ class SmDppHttpServer: def main(argv): parser = argparse.ArgumentParser() - #parser.add_argument("-H", "--host", help="Host/IP to bind HTTP to", default="localhost") - #parser.add_argument("-p", "--port", help="TCP port to bind HTTP to", default=8000) + parser.add_argument("-H", "--host", help="Host/IP to bind HTTP to", default="localhost") + parser.add_argument("-p", "--port", help="TCP port to bind HTTP to", default=8000) #parser.add_argument("-v", "--verbose", help="increase output verbosity", action='count', default=0) args = parser.parse_args() hs = SmDppHttpServer(HOSTNAME, os.path.join(DATA_DIR, 'certs', 'CertificateIssuer'), use_brainpool=False) #hs.app.run(endpoint_description="ssl:port=8000:dhParameters=dh_param_2048.pem") - hs.app.run("localhost", 8000) + hs.app.run(args.host, args.port) if __name__ == "__main__": main(sys.argv)