-
Notifications
You must be signed in to change notification settings - Fork 129
feat(structured): add structured traceroute + comprehensive IP enrichment and UI Updates #343
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
Open
WilhelmZA
wants to merge
107
commits into
thatmattlove:main
Choose a base branch
from
WilhelmZA:structured
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 99 commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
413c60e
Update ssh_netmiko.py
CarlosSuporteISP ab51462
Update mikrotik.py
CarlosSuporteISP 62a93c0
Update mikrotik.py
CarlosSuporteISP c2cf9e2
Update huawei.py
CarlosSuporteISP 7e66bbd
Update mikrotik.py
CarlosSuporteISP ff0bed6
Update __init__.py
CarlosSuporteISP 4432f48
Create bgp_routestr_mikrotik.py
CarlosSuporteISP 504c0f1
Update mikrotik_garbage_output.py
CarlosSuporteISP 16c1674
Create mikrotik_normalize_input.py
CarlosSuporteISP d72e5f9
Create bgp_routestr_huawei.py
CarlosSuporteISP 2eb9c40
Create huawei.py
CarlosSuporteISP bee6426
Create mikrotik.py
CarlosSuporteISP b405fd7
Update compose.yaml
CarlosSuporteISP 319c31b
Update compose.yaml
CarlosSuporteISP e5cae3e
Update compose.yaml
CarlosSuporteISP d8ab435
Update and rename sample_devices.yaml to sample_devices_juniper.yaml
CarlosSuporteISP 7424e03
Create sample_config.yaml
CarlosSuporteISP 44dfcac
Update sample_devices_juniper.yaml
CarlosSuporteISP 084cd20
Rename sample_devices_juniper.yaml to sample_devices.yaml
CarlosSuporteISP e409569
Create sample_directives.yaml
CarlosSuporteISP 94c2d3e
Rename sample_directives.yaml to sample_directives_huawei.yaml
CarlosSuporteISP b14025d
Create sample_terms-and-conditions.md
CarlosSuporteISP 7d20ddf
Create sample_directives_juniper.yaml
CarlosSuporteISP 6775ff4
Update sample_directives_juniper.yaml
CarlosSuporteISP 8f8ab8f
Update sample_devices.yaml
CarlosSuporteISP 3f3b233
Update sample_devices.yaml
CarlosSuporteISP d53b850
Update sample_directives_juniper.yaml
CarlosSuporteISP 5d86d06
Create sample_directives_mikrotik.yaml
CarlosSuporteISP 55612c9
Update sample_directives_mikrotik.yaml
CarlosSuporteISP f32131e
Update sample_devices.yaml
CarlosSuporteISP 3a75b58
Update README.md
CarlosSuporteISP 220b05f
Update README.md
CarlosSuporteISP e51c4b0
Update README.md
CarlosSuporteISP d28882f
Update README.md
CarlosSuporteISP 544e36a
Update README.md
CarlosSuporteISP c68cee0
Update README.md
CarlosSuporteISP 0ee425a
Update sample_config.yaml
CarlosSuporteISP 7cf02ef
Update README.md
CarlosSuporteISP c068270
Update README.md
CarlosSuporteISP 0491920
Update README.md
CarlosSuporteISP 5973ffa
Create sample_
CarlosSuporteISP f7dca9a
Update sample_
CarlosSuporteISP 142bc74
Rename sample_ to sample_hyperglass.env
CarlosSuporteISP 084d46d
Update README.md
CarlosSuporteISP 6d0ba5e
Update README.md
CarlosSuporteISP 0b1f7f2
Update sample_devices.yaml
CarlosSuporteISP 840e916
Update huawei.py
CarlosSuporteISP 16af5ce
Update mikrotik.py
CarlosSuporteISP d2e83c4
Update mikrotik.py
CarlosSuporteISP cc4a54a
Update huawei.py
CarlosSuporteISP f444694
Update compose.yaml
CarlosSuporteISP 64f48fe
Update constants.py
CarlosSuporteISP d496a26
Rename sample_devices.yaml to sample_devices2.yaml
CarlosSuporteISP 7d7a501
Rename sample_devices2.yaml to sample_devices2
CarlosSuporteISP d33532e
Rename sample_directives_huawei.yaml to sample_directives_huawei
CarlosSuporteISP 7ad947b
Rename sample_directives_juniper.yaml to sample_directives_juniper
CarlosSuporteISP 1514265
Rename sample_directives_mikrotik.yaml to sample_directives_mikrotik
CarlosSuporteISP 432704a
Rename sample_hyperglass.env to sample_hyperglass
CarlosSuporteISP ef129f3
Rename sample_terms-and-conditions.md to sample_terms-and-conditions
CarlosSuporteISP cfee063
Create sample_device.yaml
CarlosSuporteISP 0b5bcc3
Update huawei.py
CarlosSuporteISP 1dfe987
Update bgp_route_huawei.py
CarlosSuporteISP 2adfed1
Update README.md
CarlosSuporteISP 6f7fa08
Update README.md
CarlosSuporteISP bba9122
Update README.md
CarlosSuporteISP 2c37f6c
Update README.md
CarlosSuporteISP 7542dfc
Update README.md
CarlosSuporteISP d0e5aca
Update README.md
CarlosSuporteISP cb0389b
Update README.md
CarlosSuporteISP b589cef
Update README.md
CarlosSuporteISP 22b6c92
Update README.md
CarlosSuporteISP 65a4b3f
Rename sample_config.yaml to sample_config
CarlosSuporteISP 63da21b
Update mikrotik.py
CarlosSuporteISP b3d4834
Update mikrotik.py rpki ajustado pelo wilhelm_pa
CarlosSuporteISP 8131853
Added broader support for external RPKI validation.
WilhelmZA 62fc058
Update Dockerfile update CLICK ERRO typer
CarlosSuporteISP 993926e
Update pyproject.toml update typer erro click
CarlosSuporteISP fac4a80
Update requirements-dev.lock update typer erro click
CarlosSuporteISP e31e641
Update requirements.lock update typer erro click
CarlosSuporteISP c66d6d1
Update poetry.lock update erro typer click
CarlosSuporteISP 1d79ec4
Merge remote-tracking branch 'structured/main' into structured
WilhelmZA 22c8f83
Add requests dependency to pyproject.toml
WilhelmZA ae6a1a0
Refactor code for improved readability and consistency across multipl…
WilhelmZA e78685d
Enhance MikroTik BGP route handling by adding BGPRoute import and sim…
WilhelmZA eabd98b
feat: Add BGP community friendly names and enhance RPKI configuration
WilhelmZA b2a0599
fix: Improve error message for community name validation and clean up…
WilhelmZA 7a6388b
fix: Improve handling of missing data fields in MikroTik BGP parser
WilhelmZA 8f7fcac
docs: Add comprehensive configuration documentation and user guide
WilhelmZA 120af85
fix(plugins): improve MikroTik output cleaning for all directives
WilhelmZA 10ab164
fix(plugins): handle non-string output in MikroTik garbage plugin
WilhelmZA 5ace4fd
fix(plugins): improve type checking for structured output
WilhelmZA 716687d
fix(plugins): improve MikroTik traceroute output deduplication
WilhelmZA 4414d2e
fix(ui): improve BGP table field display formatting
WilhelmZA d025630
Fix: Make Huawei BGP parser conform to MikroTik approach
WilhelmZA 6af39fb
Fix: Standardize BGP parsers to use BGPRoute objects and harmonize va…
WilhelmZA c394d93
Fix: Export BGPRoute class in data models __init__.py
WilhelmZA 0398966
feat: Add structured traceroute support with comprehensive IP enrichment
WilhelmZA 9db9849
feat(structured): release structured feature set (squash merge)
WilhelmZA 93edf34
Merge branch 'main' into structured
WilhelmZA 4a10576
feat: comprehensive IP enrichment and traceroute improvements
WilhelmZA 9d7cf8c
refactor: update Dockerfile and compose.yaml, remove unused files and…
WilhelmZA bf582e2
chore: remove sample configuration and directive files for cleanup
WilhelmZA d5a5760
refactor: remove unused IP enrichment admin API endpoints
WilhelmZA 42160ca
refactor: remove unused rules and streamline Mikrotik and Huawei dire…
WilhelmZA 440a613
chore: revert sample_device.yaml
WilhelmZA 627c502
feat: Major IP enrichment refactor and validation fixes
WilhelmZA 0a3334f
Enhanced FRR traceroute parser for structured output
WilhelmZA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| org_name: EXEMPLO_EMPRESA | ||
| primary_asn: 12345 | ||
| request_timeout: 30 | ||
| site_title: Looking Glass EXEMPLO_EMPRESA | ||
| site_description: "{org_name} Network Looking Glass" | ||
| structured: | ||
| rpki: | ||
| mode: external | ||
| web: | ||
| location_display_mode: gallery | ||
| opengraph: | ||
| image: /etc/hyperglass/svg/logo.png | ||
| theme: | ||
| colors: | ||
| primary: #118ab2 | ||
| default_color_mode: dark | ||
| #logo: | ||
| #light: /etc/hyperglass/svg/logo.png | ||
| #dark: /etc/hyperglass/svg/logo.png | ||
| #favicon: /etc/hyperglass/svg/logo.svg | ||
| #width: 50% | ||
| #height: null | ||
| text: | ||
| title_mode: logo_subtitle | ||
| cache_icon: Cached from {time} UTC | ||
| cache_prefix: "Results cached for " | ||
| complete_time: Completed in {seconds} | ||
| fqdn_error: Unable to resolve {fqdn} | ||
| fqdn_error_button: Try Again | ||
| fqdn_message: Your browser has resolved {fqdn} to | ||
| fqdn_tooltip: Use {protocol} | ||
| no_communities: No Communities | ||
| query_location: Location | ||
| query_target: Target | ||
| query_type: Query Type | ||
| rpki_invalid: Invalid | ||
| rpki_unknown: No ROAs Exist | ||
| rpki_unverified: Not Verified | ||
| rpki_valid: Valid | ||
| subtitle: Network Looking Glass | ||
| title: hyperglass | ||
| links: | ||
| - title: PeeringDB | ||
| url: https://www.peeringdb.com/asn/65000 | ||
| show_icon: true | ||
| side: left | ||
| order: 1 | ||
| - title: Qrator | ||
| url: https://radar.qrator.net/AS65000 | ||
| show_icon: true | ||
| side: left | ||
| order: 2 | ||
| - title: RADb | ||
| url: https://www.radb.net/query?advanced_query=&keywords=AS65000 | ||
| show_icon: true | ||
| side: left | ||
| order: 3 | ||
| - title: IRR Explorer | ||
| url: https://irrexplorer.nlnog.net/asn/AS65000 | ||
| show_icon: true | ||
| side: left | ||
| order: 4 | ||
| - title: RDAP | ||
| url: https://rdap.registro.br/autnum/65000 | ||
| show_icon: true | ||
| side: left | ||
| order: 5 | ||
| - title: BGP VIEW | ||
| url: https://bgpview.io/asn/65000#graph | ||
| side: left | ||
| order: 6 | ||
| - title: BGP HE | ||
| url: https://bgp.he.net/AS65000#_prefixes | ||
| show_icon: true | ||
| side: left | ||
| order: 7 | ||
| - title: BGP TOOLS | ||
| url: https://bgp.tools/as/65000#connectivity | ||
| side: left | ||
| order: 8 | ||
| - title: BGP PLAY | ||
| url: https://stat.ripe.net/widget/bgplay#w.resource=65000 | ||
| side: left | ||
| order: 9 | ||
| - title: UPX TOOLS | ||
| url: https://upx.tools/bgp-overview/65000 | ||
| side: left | ||
| order: 10 | ||
| - title: My Site | ||
| url: https://www.mysite.com.br | ||
| show_icon: true | ||
| side: right | ||
| order: 0 | ||
| menus: | ||
| - title: Contato | ||
| content: "- Por favor entre em contato [[email protected]](mailto:[email protected]) para suporte." | ||
| side: right | ||
| - title: Termos e Condições | ||
| content: /etc/hyperglass/terms-and-conditions.md | ||
| side: right | ||
| credit: | ||
| enable: true | ||
| messages: | ||
| authentication_error: "-Authentication error occurred." | ||
| connection_error: "- Error connecting to {device_name}: {error}" | ||
| target_not_allowed: "- {target} is not allowed." | ||
| general: "- Something went wrong." | ||
| invalid_field: "- {input} is an invalid {field}." | ||
| invalid_input: "- {target} is not a valid {query_type} target." | ||
| no_input: "- {field} must be specified." | ||
| no_output: "- The query completed, but no matching results were found." | ||
| request_timeout: "- Request timed out." | ||
| logging: | ||
| directory: /var/log/ | ||
| format: text | ||
| cache: | ||
| timeout: 120 | ||
| show_text: true |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| devices: | ||
| - name: AS1234_Example Device | ||
| address: 127.0.0.1 | ||
| credential: | ||
| username: test | ||
| password: test | ||
| platform: juniper | ||
| port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR. | ||
| structured_output: True | ||
| directives: | ||
| - builtins: [BGPRoute] | ||
| - JuniperTraceroute | ||
| - JuniperPing | ||
| attrs: | ||
| source4: 127.0.0.1 | ||
| source6: 2001:db8::1 | ||
|
|
||
| - name: AS1234_Example Device | ||
| address: 127.0.0.1 | ||
| credential: | ||
| username: test | ||
| password: test | ||
| port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR. | ||
| platform: huawei | ||
| structured_output: true | ||
| directives: | ||
| - builtins: [BGP_Route] | ||
| - Huawei_Traceroute | ||
| - Huawei_Ping | ||
| attrs: | ||
| source4: 127.0.0.1 | ||
| source6: 2001:db8::1 | ||
|
|
||
| - name: AS1234_Example Device | ||
| driver_args: | ||
| global_delay_factor: 3 | ||
| address: 127.0.0.1 | ||
| credential: | ||
| username: test | ||
| password: test | ||
| port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR. | ||
| platform: mikrotik_routeros | ||
| structured_output: true | ||
| directives: | ||
| - builtins: [BGP_Route] | ||
| - MikroTik_Traceroute | ||
| - MikroTik_Ping | ||
| attrs: | ||
| source4: 127.0.0.1 | ||
| source6: 2001:db8::1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| Huawei_Traceroute: | ||
| name: Traceroute | ||
| rules: | ||
| # REGRA DENY RFC 6598 | ||
| - condition: '100.64.0.0/10' | ||
| ge: 10 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE A | ||
| - condition: '10.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE B | ||
| - condition: '172.16.0.0/12' | ||
| ge: 12 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE C | ||
| - condition: '192.168.0.0/16' | ||
| ge: 16 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY LO | ||
| - condition: '127.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY ASN PREFIXO | ||
| - condition: 'SEU_PREFIXO_IPv4_AGORA' | ||
| ge: 22 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY DEFAULT ROUTE | ||
| - condition: '0.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| - condition: '0.0.0.0/0' | ||
| ge: 32 | ||
| le: 32 | ||
| action: permit | ||
| command: 'tracert -w 500 -q 1 -f 1 -a {source4} {target}' | ||
| # REGRA DENY SITE LOCAL DEPRECIADO RFC 3879 | ||
| - condition: 'fec0::/10' | ||
| ge: 10 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY ULA RFC 4193 | ||
| - condition: 'fc00::/7' | ||
| ge: 7 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY LINK LOCAL RFC 4291 | ||
| - condition: 'fe80::/10' | ||
| ge: 10 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY Unspecified RFC 4291 | ||
| - condition: '::/128' | ||
| ge: 128 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY LO RFC 4291 | ||
| - condition: '::1/128' | ||
| ge: 128 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY ASN PREFIXO | ||
| - condition: 'SEU_PREFIXO_IPv6_AGORA' | ||
| ge: 32 | ||
| le: 128 | ||
| action: deny | ||
| - condition: '::/0' | ||
| ge: 128 | ||
| le: 128 | ||
| action: permit | ||
| command: 'tracert ipv6 -w 500 -q 1 -f 1 -a {source6} {target}' | ||
| field: | ||
| description: IP Address, or Hostname | ||
| Huawei_Ping: | ||
| name: Ping | ||
| rules: | ||
| # REGRA DENY RFC 6598 | ||
| - condition: '100.64.0.0/10' | ||
| ge: 10 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE A | ||
| - condition: '10.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE B | ||
| - condition: '172.16.0.0/12' | ||
| ge: 12 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY RFC 1918 CLASSE C | ||
| - condition: '192.168.0.0/16' | ||
| ge: 16 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY LO | ||
| - condition: '127.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY ASN PREFIXO | ||
| - condition: 'SEU_PREFIXO_IPv4_AGORA' | ||
| ge: 22 | ||
| le: 32 | ||
| action: deny | ||
| # REGRA DENY DEFAULT ROUTE | ||
| - condition: '0.0.0.0/8' | ||
| ge: 8 | ||
| le: 32 | ||
| action: deny | ||
| - condition: '0.0.0.0/0' | ||
| ge: 32 | ||
| le: 32 | ||
| command: 'ping -t 500 -c 5 -a {source4} {target}' | ||
| # REGRA DENY SITE LOCAL DEPRECIADO RFC 3879 | ||
| - condition: 'fec0::/10' | ||
| ge: 10 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY ULA RFC 4193 | ||
| - condition: 'fc00::/7' | ||
| ge: 7 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY LINK LOCAL RFC 4291 | ||
| - condition: 'fe80::/10' | ||
| ge: 10 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY Unspecified RFC 4291 | ||
| - condition: '::/128' | ||
| ge: 128 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY LO RFC 4291 | ||
| - condition: '::1/128' | ||
| ge: 128 | ||
| le: 128 | ||
| action: deny | ||
| # REGRA DENY ASN PREFIXO | ||
| - condition: 'SEU_PREFIXO_IPv6_AGORA' | ||
| ge: 32 | ||
| le: 128 | ||
| action: deny | ||
| - condition: '::/0' | ||
| ge: 128 | ||
| le: 128 | ||
| action: permit | ||
| command: 'ping ipv6 -t 500 -c 5 -a {source6} {target}' | ||
| field: | ||
| description: IP Address, or Hostname |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.