Skip to main content

Reverse proxy with synology authentication

Project description

revproxy_auth

This class implements a reverse proxy intended to work inside a Flask server, allows to use the synology auth credentials for all your services behind the synology service proxy. Have you setup the reverse proxy in your synology NAS, but don´t want that everyone who knows your services´ URL can have access to your services? This repo will allow you to restrict the access from internet to your internal Api REST webservices, using the credentials and users that you have created in your Synology NAS. It will also request the OTP code if you have that configured in your NAS.

Configuration yml file will be place in the /home/var/{yourservicename}

Revproxy_auth can work in two mode:

  1. Embeded. You can embed the authentication by modifying your Flask based service: self.app = Flask(name, template_folder=template_folder, static_folder=static_folder) self.revproxy_auth = RevProxyAuth(self.app, root_class='yourservicename') self.app.add_url_rule('/', 'index', self.main_endpoint, methods=['GET', 'POST']) ... def main_endpoint(self): """ Main endpoint that returns the main page for your service Returns: response: The main html content """ return self.revproxy_auth.get_auth_response(request, lambda : render_template('form.html'))

  2. Proxy You need to make available a new service inside your LAN with the authproxy. You may want to include revproxy-auth as part of you already existing services... no need to create an specific flask or any newwsgi just for this. Just make the API REST call available. Configure the service in the config.yml so that it can redirect all the requests to the proper internal host & port. Create all your entry points in the synology reverse proxy menu, and make all of them point to the authproxy endpoint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revproxy-auth-0.1.11.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

revproxy_auth-0.1.11-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file revproxy-auth-0.1.11.tar.gz.

File metadata

  • Download URL: revproxy-auth-0.1.11.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.28.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1

File hashes

Hashes for revproxy-auth-0.1.11.tar.gz
Algorithm Hash digest
SHA256 708fa21a1e2ffc4b11ad72a11324b1ca52a5d082ca11c0c02f87589778a49764
MD5 84c71cb3136bd870b18441892ac3f628
BLAKE2b-256 dfdc4c05f3037fe824d54ea81fa49b108145626c9c3e9509f10da66c457b353d

See more details on using hashes here.

File details

Details for the file revproxy_auth-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: revproxy_auth-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.28.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1

File hashes

Hashes for revproxy_auth-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 274634c5d722f869960e6e2094d0a3588cc8343db922f8e5e520b9964af7d2ab
MD5 30980a769ec29161370c6965b8a3d58c
BLAKE2b-256 c2eae7bde17402ff08acefd240dff8f0e737d39dfc3bc7636bc0f3d44da49c85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page