Skip to content

Conversation

thinker0
Copy link

Add proxy authentication support with username/password

Description

This PR adds the ability to use authenticated proxies by including username and password credentials in proxy URLs.

Changes

  • Added username and password fields to ProxySettings struct
  • Extended database storage and retrieval for proxy credentials
  • Added authentication to proxy URLs using the standard format (http://username:password@hostname:port)
  • Added secure handling of credentials (password masking in UI, credentials hiding in logs)
  • Added comprehensive test coverage for the authentication functionality

Features

  • Users can now set proxy username and password in the proxy settings UI
  • Credentials are automatically applied to HTTP, HTTPS, and ALL proxy settings
  • Credentials are securely stored in the application database
  • Works with any proxy server that supports basic authentication

Testing

  • Added unit tests for URL construction with authentication

  • Added tests for environment variable handling with credentials

    • Added tests for database storage and retrieval of credentials
  • Tested complex URLs with paths, query parameters, and special characters

    This enhancement allows users to connect through proxies that require authentication, which is commonly needed in corporate environments.

@thinker0 thinker0 changed the title Add proxy authentication support with username/password Feature: Add proxy authentication support with username/password Aug 26, 2025
Add proxy authentication support with username/password

# Description

This PR adds the ability to use authenticated proxies by including username and password credentials in proxy URLs.

# Changes

- Added username and password fields to ProxySettings struct
- Extended database storage and retrieval for proxy credentials
- Added authentication to proxy URLs using the standard format (http://username:password@hostname:port)
- Added secure handling of credentials (password masking in UI, credentials hiding in logs)
- Added comprehensive test coverage for the authentication functionality

# Features

- Users can now set proxy username and password in the proxy settings UI
- Credentials are automatically applied to HTTP, HTTPS, and ALL proxy settings
- Credentials are securely stored in the application database
- Works with any proxy server that supports basic authentication

# Testing

- Added unit tests for URL construction with authentication
- Added tests for environment variable handling with credentials
  - Added tests for database storage and retrieval of credentials
- Tested complex URLs with paths, query parameters, and special characters

  This enhancement allows users to connect through proxies that require authentication, which is commonly needed in corporate environments.
@thinker0 thinker0 force-pushed the feature/support-password-of-proxy branch from aa080c1 to cd37b37 Compare September 1, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant