netbox-proxy-plugin 0.1.2__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/.gitignore +1 -0
  2. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/CHANGELOG.md +9 -1
  3. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/PKG-INFO +1 -1
  4. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/__init__.py +1 -1
  5. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/proxy_router.py +8 -16
  6. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/pyproject.toml +1 -1
  7. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/LICENSE +0 -0
  8. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/README.md +0 -0
  9. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/api/__init__.py +0 -0
  10. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/api/serializers.py +0 -0
  11. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/api/urls.py +0 -0
  12. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/api/views.py +0 -0
  13. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/filtersets.py +0 -0
  14. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/forms.py +0 -0
  15. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/migrations/0001_initial.py +0 -0
  16. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/migrations/__init__.py +0 -0
  17. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/models.py +0 -0
  18. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/navigation.py +0 -0
  19. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/tables.py +0 -0
  20. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/templates/netbox_proxy_plugin/proxy.html +0 -0
  21. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/urls.py +0 -0
  22. {netbox_proxy_plugin-0.1.2 → netbox_proxy_plugin-0.1.3}/netbox_proxy_plugin/views.py +0 -0
@@ -32,6 +32,7 @@ Thumbs.db
32
32
 
33
33
  # AI / MCP
34
34
  .mcp.json
35
+ CLAUDE.md
35
36
 
36
37
  # uv
37
38
  uv.lock
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.3] - 2025-03-13
11
+
12
+ ### Fixed
13
+
14
+ - Proxy router no longer filters by protocol, allowing HTTP proxies to handle HTTPS targets (#9)
15
+ - Remove dead `_get_protocol_from_url` method and unused `urlparse` import
16
+
10
17
  ## [0.1.2] - 2025-03-12
11
18
 
12
19
  ### Changed
@@ -44,7 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
44
51
  - Docker-based development environment (`dev/`)
45
52
  - Dual compatibility: installs on NetBox 4.4 (UI & API), full routing on 4.5+
46
53
 
47
- [Unreleased]: https://github.com/thomaschristory/netbox-proxy-plugin/compare/v0.1.2...HEAD
54
+ [Unreleased]: https://github.com/thomaschristory/netbox-proxy-plugin/compare/v0.1.3...HEAD
55
+ [0.1.3]: https://github.com/thomaschristory/netbox-proxy-plugin/compare/v0.1.2...v0.1.3
48
56
  [0.1.2]: https://github.com/thomaschristory/netbox-proxy-plugin/compare/v0.1.1...v0.1.2
49
57
  [0.1.1]: https://github.com/thomaschristory/netbox-proxy-plugin/compare/v0.1.0...v0.1.1
50
58
  [0.1.0]: https://github.com/thomaschristory/netbox-proxy-plugin/releases/tag/v0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-proxy-plugin
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: NetBox plugin for managing HTTP proxy configurations
5
5
  Project-URL: Homepage, https://github.com/thomaschristory/netbox-proxy-plugin
6
6
  Project-URL: Repository, https://github.com/thomaschristory/netbox-proxy-plugin
@@ -1,6 +1,6 @@
1
1
  from netbox.plugins import PluginConfig
2
2
 
3
- __version__ = "0.1.2"
3
+ __version__ = "0.1.3"
4
4
 
5
5
 
6
6
  class NetboxProxyPluginConfig(PluginConfig):
@@ -1,5 +1,3 @@
1
- from urllib.parse import urlparse
2
-
3
1
  from django.db.models import Q
4
2
 
5
3
  # Map client class paths to routing choice values. NetBox 4.5 passes the
@@ -34,10 +32,6 @@ class PluginProxyRouter:
34
32
  ]
35
33
  """
36
34
 
37
- @staticmethod
38
- def _get_protocol_from_url(url):
39
- return urlparse(url).scheme
40
-
41
35
  @staticmethod
42
36
  def _detect_routing(url, context):
43
37
  """Determine the routing tag from the caller context or URL."""
@@ -66,14 +60,8 @@ class PluginProxyRouter:
66
60
  def route(self, url=None, protocol=None, context=None):
67
61
  from .models import Proxy
68
62
 
69
- if url and protocol is None:
70
- protocol = self._get_protocol_from_url(url)
71
-
72
63
  proxies = Proxy.objects.all()
73
64
 
74
- if protocol:
75
- proxies = proxies.filter(protocol=protocol)
76
-
77
65
  # Narrow by routing tag when we can identify the subsystem.
78
66
  routing_type = self._detect_routing(url, context)
79
67
  if routing_type:
@@ -81,8 +69,12 @@ class PluginProxyRouter:
81
69
  Q(routing__contains=[routing_type]) | Q(routing=[])
82
70
  )
83
71
 
84
- result = {}
85
- for proxy in proxies:
86
- result[proxy.protocol] = proxy.url
72
+ proxy = proxies.first()
73
+ if proxy is None:
74
+ return None
87
75
 
88
- return result or None
76
+ # Map both http and https targets to the proxy URL. The proxy
77
+ # protocol (how the client talks to the proxy) is independent of
78
+ # the target protocol. An HTTP proxy handles HTTPS via CONNECT.
79
+ proxy_url = proxy.url
80
+ return {"http": proxy_url, "https": proxy_url}
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "netbox-proxy-plugin"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  description = "NetBox plugin for managing HTTP proxy configurations"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"