Skip to content

ioBroker/ioBroker.proxy

Repository files navigation

Logo

ioBroker.proxy

Number of Installations Number of Installations NPM version Downloads Tests

NPM

Usage

Allows to access defined URLs or local files via one web server.

Specified routes will be available under http://ip:8082/proxy.0/context/.... Of course port, protocol, proxy.0, can variate depends on settings.

Configuration

  • Extend WEB adapter: For which web instance will active this proxy.
  • Route path: Path for proxy. If "/proxy.0", so the routes will be available under http://webIP:8082/proxy.0/...
  • Error timeout(ms): Minimal interval between retries if the requested resource was unavailable or returned error.
  • Use simple proxy: in this case the very simple but robust method will be used. It is not suitable for web sockets or POST request. Use this method if you have some issues with WEB Instance or socket.io communication.

Sample settings

Context URL Description
admin/ http://localhost:8081 access to admin page
router/ http://192.168.1.1 access to local router
cam/ http://user:pass@192.168.1.123 access to webcam (e.g. call http://ip:8082/proxy.0/cam/web/snapshot.jpg)
dir/ /tmp/ access to local directory "/tmp/"
dir/ tmp/ access to local directory "/opt/iobroker/tmp"
file.jpg /tmp/picture.jpg access to local file "/tmp/picture.jpg"

Not all devices can be accessed via proxy.

Some devices wants to be located in the root http://ip/ and cannot run under http://ip/proxy.0/context/.

You can read more about context here

Additionally the user can define the route path for proxy requests.

Changelog

1.3.2 (2022-10-01)

  • (Apollon77) Allow to also proxy files directly

1.3.1 (2022-06-02)

  • (Apollon77) Revert the automatic WS upgrade call added in 1.3.0 because produced sometimes issues with websocket connections

1.3.0 (2022-05-30)

  • (Apollon77) Allow to configure the maximum parallel requests by route and/or globally. Default is 10 as of now too
  • (Apollon77) Try to prevent crashes by socket errors

1.2.2 (2021-03-07)

  • (Apollon77) Fallback to "application/octet-stream" when mime type for a file could not be determined
  • (Apollon77) Cut filenames when looking them up in the filesystem if "?" or "#" are included

1.2.1 (2020-04-14)

  • (bluefox) Corrected error with access to local files

1.2.0 (2020-03-08)

  • (Apollon77) update dependencies

1.1.1 (2019-07-02)

  • (bluefox) Implemented simple proxy to eliminate socket.io problem

1.0.3 (2018-07-14)

  • (bluefox) Newer mime version used

1.0.2 (2018-06-30)

  • (bluefox) URI was decoded for usage of special chars in password and login

1.0.1 (2018-03-01)

  • (bluefox) Fixed error: after 10 timeouts the web cam was never reachable
  • (bluefox) Ready for Admin3

1.0.0 (2017-10-09)

  • (bluefox) do not allow the error generation to fast

0.2.0 (2017-03-13)

  • (bluefox) fix run-mode

0.0.1 (2017-01-09)

  • (bluefox) initial commit

License

The MIT License (MIT)

Copyright (c) 2017-2022 bluefox dogafox@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.