api: change default listen address to 127.0.0.1:9997

This commit is contained in:
aler9 2021-08-07 18:32:22 +02:00 committed by Alessandro Ros
parent 3134b95e80
commit dd33ef740e
3 changed files with 15 additions and 3 deletions

View File

@ -545,7 +545,19 @@ In some scenarios, the server can send incomplete or corrupted frames. This can
### HTTP API
TODO
The server can be queried and controlled with an HTTP API, that must be enabled by setting the `api` parameter in the configuration:
```yml
api: yes
```
The API listens on `apiAddress`, that by default is `127.0.0.1:9997`; for instance, to obtain a list of active paths, run:
```
curl http//127.0.0.1:9997/list
```
Full documentation of the API is available on the [dedicated site](https://aler9.github.io/rtsp-simple-server/).
### Command-line usage

View File

@ -212,7 +212,7 @@ func (conf *Conf) CheckAndFillMissing() error {
}
if conf.APIAddress == "" {
conf.APIAddress = ":9997"
conf.APIAddress = "127.0.0.1:9997"
}
if conf.MetricsAddress == "" {

View File

@ -21,7 +21,7 @@ readBufferCount: 512
# enable the HTTP API.
api: no
# address of the API listener.
apiAddress: :9997
apiAddress: 127.0.0.1:9997
# enable Prometheus-compatible metrics.
metrics: no