Skip to content

Instantly share code, notes, and snippets.

@zheng022
Last active May 22, 2023 17:16
Show Gist options
  • Select an option

  • Save zheng022/b7fb48e9b373374de9da20ede57ae7c2 to your computer and use it in GitHub Desktop.

Select an option

Save zheng022/b7fb48e9b373374de9da20ede57ae7c2 to your computer and use it in GitHub Desktop.
noproxy

Since this is the 3rd time a ticket is created because of this check added a while back, I think it is a good idea to have a summary and clarification on what will be allowed as a noproxy

IP address

rule example actual expected issue checked by
full valid IPV4 is allowed 192.168.10.10 allowed allowed no IPAddr.new(host_to_check)
full valid IPV6 is allowed 2001:42:4:0:0:1:34:0 allowed allowed no IPAddr.new(host_to_check)
partial IP with preceeding dot as wild card is not allowed .192.168 not allowed unknown no IPAddr.new(host_to_check)
partial IP with trailing dot as wild card is not allowed 192.168. not allowed allowed 6352 IPAddr.new(host_to_check)

hostname

example actual expected issue checked by
full hostname with registered TLD is allowed www.foo.gov.us allowed allowed no PublicSuffix.valid?(hostname, default_rule: nil)
registered top/secondary level domain without preceding dot is not allowed foo.hsbc not allowed not allowed no noproxy_hostname_should_have_leading_dot
registered first level domain without preceding dot is not allowed hsbc not allowed not allowed 6147 noproxy_hostname_should_have_leading_dot
self-defined host without preceding dot is not allowed localhost not allowed allowed 6352 noproxy_hostname_should_have_leading_dot

** registered tld: https://data.iana.org/TLD/tlds-alpha-by-domain.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment