Improve Code Quality of SOCKS Connections #368

Open
opened 2026-01-22 14:22:39 +00:00 by tobru · 0 comments
Owner

Stories

As a developer, I want to have clean code for SOCKS connection handling

Implementation Notes

Cleanup some of the findings from the PR #344:

  • Validate and properly handle SOCKS URLs: "What does the typical SOCKS URL look like in practical use? Will it contain URL-based credentials or is it just a URL? Might be worth using a URLField for this, or at least an input validator. (This validator could also be reused in the SOCKS client class to make sure at instantiation that the URL is really valid.)" -> No credentials right now.
  • Re servala/servala-portal@6fa4b09b6a – the models file is already fairly huge, and putting a HTTP client in there makes it even larger and is not great re: separation of concerns imo. The SOCKSRESTClientObject also does not call super().init(), and instead vendors most of it. Might be worth calling super() and then overriding pool_manager afterwards, cutting down on code duplication.
## Stories _As a developer, I want to have clean code for SOCKS connection handling_ ## Implementation Notes Cleanup some of the findings from the PR #344: * Validate and properly handle SOCKS URLs: "What does the typical SOCKS URL look like in practical use? Will it contain URL-based credentials or is it just a URL? Might be worth using a URLField for this, or at least an input validator. (This validator could also be reused in the SOCKS client class to make sure at instantiation that the URL is really valid.)" -> No credentials right now. * Re servala/servala-portal@6fa4b09b6a – the models file is already fairly huge, and putting a HTTP client in there makes it even larger and is not great re: separation of concerns imo. The SOCKSRESTClientObject also does not call super().__init__(), and instead vendors most of it. Might be worth calling super() and then overriding pool_manager afterwards, cutting down on code duplication.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
servala/servala-portal#368
No description provided.