Skip to content

Commit

Permalink
Fix deprecation warnings, extend cryptography range, bump marshmallow…
Browse files Browse the repository at this point in the history
…, extend pymongo range
  • Loading branch information
reuvenstr committed Oct 14, 2024
1 parent 8ca229b commit e95c4a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions netunnel/server/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def load3(self, obj, *args, **kwargs):

class StaticTunnelSchema(NETunnelSchema):
id = fields.Integer()
tunnel_remote_address = fields.String(default='127.0.0.1', missing='127.0.0.1')
tunnel_remote_address = fields.String(dump_default='127.0.0.1', load_default='127.0.0.1')
tunnel_remote_port = fields.Integer(required=True, validate=validate.Range(min=1, max=65535))
tunnel_local_address = fields.String(default='127.0.0.1', missing='127.0.0.1')
tunnel_local_address = fields.String(dump_default='127.0.0.1', load_default='127.0.0.1')
tunnel_local_port = fields.Integer(required=True, validate=validate.Range(min=1, max=65535))

@pre_load
Expand Down
22 changes: 11 additions & 11 deletions netunnel/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ def _setup_routes(self):
web.get('/version', self.get_version),
web.post('/channels', self.create_channel), # Creates a channel
web.post('/authenticate', self._auth_server.authenticate),
web.get('/channels/{channel_id:\d+}/connect', self.serve_channel), # Connect the channel (websocket)
web.post('/channels/{channel_id:\d+}/tunnels', self.post_tunnel), # Creates a tunnel
web.delete('/channels/{channel_id:\d+}/tunnels/{tunnel_id:\d+}', self.delete_tunnel), # Delete a tunnel
web.get('/channels/{channel_id:\d+}/tunnels/{tunnel_id:\d+}/connect', self.websocket_to_tunnel), # Feed a tunnel with a websocket
web.get(r'/channels/{channel_id:\d+}/connect', self.serve_channel), # Connect the channel (websocket)
web.post(r'/channels/{channel_id:\d+}/tunnels', self.post_tunnel), # Creates a tunnel
web.delete(r'/channels/{channel_id:\d+}/tunnels/{tunnel_id:\d+}', self.delete_tunnel), # Delete a tunnel
web.get(r'/channels/{channel_id:\d+}/tunnels/{tunnel_id:\d+}/connect', self.websocket_to_tunnel), # Feed a tunnel with a websocket
web.get('/peers', self.list_peers),
web.post('/peers', self.register_peer),
web.get('/peers/{peer_id:\d+}', self.get_peer),
web.post('/peers/{peer_id:\d+}', self.update_peer),
web.delete('/peers/{peer_id:\d+}', self.delete_peer),
web.get('/peers/{peer_id:\d+}/static_tunnels', self.list_peer_static_tunnels),
web.post('/peers/{peer_id:\d+}/static_tunnels', self.create_peer_static_tunnels),
web.get('/peers/{peer_id:\d+}/static_tunnels/{static_tunnel_id:\d+}', self.get_peer_static_tunnel),
web.delete('/peers/{peer_id:\d+}/static_tunnels/{static_tunnel_id:\d+}', self.delete_peer_static_tunnel),
web.get(r'/peers/{peer_id:\d+}', self.get_peer),
web.post(r'/peers/{peer_id:\d+}', self.update_peer),
web.delete(r'/peers/{peer_id:\d+}', self.delete_peer),
web.get(r'/peers/{peer_id:\d+}/static_tunnels', self.list_peer_static_tunnels),
web.post(r'/peers/{peer_id:\d+}/static_tunnels', self.create_peer_static_tunnels),
web.get(r'/peers/{peer_id:\d+}/static_tunnels/{static_tunnel_id:\d+}', self.get_peer_static_tunnel),
web.delete(r'/peers/{peer_id:\d+}/static_tunnels/{static_tunnel_id:\d+}', self.delete_peer_static_tunnel),
web.get('/config/http-proxy', self.get_default_http_proxy), # Return the default http proxy settings
web.post('/config/http-proxy', self.set_default_http_proxy), # Set the default http proxy
web.post('/config/factory-reset', self.factory_reset) # DANGEROUS - Erase and recreate the configurations
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ def read(path):
install_requires = [
'aiohttp>=3.9.5,<4.0.0',
'aiofiles>=0.0.4',
'pymongo>=4.8.0',
'marshmallow>=2.8,<4', # We have temporary backwards compatibility for 2.X, but also support 3.X
'cryptography>=43.0.0',
'pymongo>=3.8.0',
'marshmallow>=3.17.0,<4',
'cryptography>=41.0.0',
'colorama>=0.2',
'click',
'importlib-metadata<4'
]
setup(
name="netunnel",
version='1.0.12',
version='1.0.13',
description='A tool to create network tunnels over HTTP/S written in Python 3',
long_description="\n\n".join((read("README.md"), read("CHANGES.md"))),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit e95c4a4

Please sign in to comment.