Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Hostname from forward_proxy to forward-proxy for RFC Compliance #231

Open
djuarezgf opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@djuarezgf
Copy link
Member

Background
In our Docker infrastructure known as "bridgehead," we currently use the proxy URL http://forward_proxy:3128. This URL format includes an underscore (_) in the hostname. This report examines why this usage may be problematic and suggests a more compliant alternative.

Compliance with RFC Standards
RFC 3986: Uniform Resource Identifier (URI) Generic Syntax
RFC 3986 defines the generic syntax of URIs, including URLs. According to Section 2.3 of this RFC:

Unreserved Characters: The characters allowed in the URI include uppercase and lowercase letters, decimal digits, hyphen (-), period (.), underscore (_), and tilde (~).

unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

However, this standard does not specifically address the rules for hostnames within the URI.

DNS Standards: RFC 1035 and RFC 1123
For hostnames, RFC 1035 and RFC 1123 provide more specific rules:

RFC 1035: Defines the legal characters for domain names:

Letters (a-z, A-Z)
Digits (0-9)
Hyphens (-)
Underscores (_) are explicitly not allowed in domain names.

RFC 1123: Updates and clarifies that hostnames must follow the ARPANET hostname rules, which include:

Hostnames must not contain underscores.
Hostnames can include letters, digits, and hyphens, but must start and end with an alphanumeric character.

Issues with http://forward_proxy:3128
The current proxy URL http://forward_proxy:3128 uses forward_proxy as the hostname. Since underscores are not allowed in DNS hostnames, this format does not comply with the standards defined in RFC 1035 and RFC 1123.

Problems:

  1. Non-compliance with DNS Standards: The hostname forward_proxy contains an underscore, which is not permitted according to DNS rules.
  2. Potential Connectivity Issues: DNS servers and various network tools may not handle or recognize hostnames with underscores properly, leading to potential connectivity issues or failures.

Recommendation
To comply with the RFC standards and ensure proper functioning of the proxy configuration, it is recommended to modify the hostname by replacing the underscore with a hyphen. For instance:

Proposed URL: http://forward-proxy:3128

Benefits:
Standards Compliance: The hostname forward-proxy adheres to DNS standards and avoids the use of invalid characters.
Improved Reliability: Using a compliant hostname reduces the risk of connectivity issues and improves overall reliability in network configurations.

Conclusion
For the Docker infrastructure known as "bridgehead," it is essential to update the proxy URL to use a compliant hostname format. Changing http://forward_proxy:3128 to http://forward-proxy:3128 will align with RFC standards and improve the stability and compatibility of our network configurations.

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

No branches or pull requests

1 participant