Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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