# wanjeri-mj/network_programming architecture

> Architecture diagram of the GitHub repository wanjeri-mj/network_programming, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wanjeri-mj/network_programming
- Repository: https://github.com/wanjeri-mj/network_programming

## Overview

This repository is a collection of independent network-programming case-study scripts, not one integrated application. Users run a chosen script to perform a small task and see printed results or, for the tool runner, a report file. The examples cover helpdesk sockets, network diagnostics, host and interface information, URL handling, authentication, device abstractions, and proxy policies. The sampled scripts show a few direct runtime interactions; most exercises are independent. Several files are indexed but unsampled, so their internal behavior and connections are left unasserted.

Main entry points: [`network_programming/case_study1/helpdesk_python.py`](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_python.py) (Helpdesk Client), [`network_programming/case_study1/secure_client.py`](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/secure_client.py) (Secure Client), [`network_programming/case_study2/network_tool_runner.py`](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/network_tool_runner.py) (Tool Runner), [`network_programming/case_study2/port_scanner.py`](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/port_scanner.py) (Port Scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_helpdesk["Helpdesk Sockets"]
  node_helpdesk_client["Helpdesk Client<br/>[helpdesk_python.py]"]
  node_helpdesk_server["Helpdesk Server<br/>[helpdesk_python.py]"]
  node_secure_helpdesk_client["Secure Client<br/>[secure_client.py]"]
  node_secure_helpdesk_server["Secure Helpdesk"]
  node_transport_compare["TCP UDP Compare<br/>[tcp_udp_compare.py]"]
end

subgraph group_diagnostics["Network Diagnostics"]
  node_tool_runner["Tool Runner"]
  node_port_scanner["Port Scanner<br/>[port_scanner.py]"]
  node_reachability_checker["Reachability Checker"]
end

subgraph group_hostinfo["Host And Interfaces"]
  node_host_resolver["Host Resolver<br/>[host_resolver.py]"]
  node_ip_classifier["IP Classifier<br/>[ip_classifier.py]"]
  node_local_host["Local Host Info<br/>[local_host_info.py]"]
  node_interface_lister["Interface Lister"]
  node_network_devices["Network Devices<br/>[network_devices.py]"]
  node_reachability_report["Reachability Report"]
end

subgraph group_urls["URL And Access"]
  node_relative_url["Relative URL Resolver"]
  node_url_components["URL Component Extractor"]
  node_url_classifier["URL URI Classifier"]
  node_authenticator["Authenticator"]
  node_protected_page["Protected Page Simulation"]
  node_url_encoder["URL Encoder Decoder"]
end

subgraph group_proxy["Proxy Policies"]
  node_proxy_configuration["Proxy Configuration"]
  node_proxy_failure["Proxy Failure Handling"]
  node_proxy_selection["Proxy Selection<br/>[proxy_selection.py]"]
end

node_user(("User"))
node_network(("Network Hosts"))
node_dns(("DNS Service"))
node_local_os(("Local OS"))
node_system_tools(("System Tools"))

node_user -->|"enters issue"| node_helpdesk_client
node_helpdesk_client -->|"sends request"| node_helpdesk_server
node_helpdesk_server -->|"returns ticket"| node_helpdesk_client
node_user -->|"enters issue"| node_secure_helpdesk_client
node_secure_helpdesk_client -.->|"sends request"| node_secure_helpdesk_server
node_user -.->|"runs example"| node_transport_compare
node_user -->|"runs tools"| node_tool_runner
node_tool_runner -->|"executes commands"| node_system_tools
node_user -->|"enters host"| node_port_scanner
node_port_scanner -->|"probes ports"| node_network
node_user -.->|"runs check"| node_reachability_checker
node_user -->|"enters domain"| node_host_resolver
node_host_resolver -->|"resolves addresses"| node_dns
node_user -.->|"runs example"| node_ip_classifier
node_user -->|"requests details"| node_local_host
node_local_host -->|"reads interfaces"| node_local_os
node_user -->|"requests profiles"| node_interface_lister
node_interface_lister -->|"reads interface data"| node_local_os
node_user -->|"runs simulation"| node_network_devices
node_user -.->|"runs report"| node_reachability_report
node_user -.->|"supplies URL"| node_relative_url
node_user -.->|"supplies URL"| node_url_components
node_user -->|"supplies identifier"| node_url_classifier
node_user -->|"enters credentials"| node_authenticator
node_user -.->|"runs simulation"| node_protected_page
node_user -.->|"supplies URL"| node_url_encoder
node_user -.->|"sets proxy"| node_proxy_configuration
node_user -->|"provides settings"| node_proxy_failure
node_user -->|"enters target"| node_proxy_selection

click node_helpdesk_client "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_python.py"
click node_helpdesk_server "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_python.py"
click node_secure_helpdesk_client "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/secure_client.py"
click node_secure_helpdesk_server "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_secure_python.py"
click node_transport_compare "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/tcp_udp_compare.py"
click node_tool_runner "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/network_tool_runner.py"
click node_port_scanner "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/port_scanner.py"
click node_reachability_checker "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/reachability_checker.py"
click node_host_resolver "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/host_resolver.py"
click node_ip_classifier "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/ip_classifier.py"
click node_local_host "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/local_host_info.py"
click node_interface_lister "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/interface_lister.py"
click node_network_devices "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/network_devices.py"
click node_reachability_report "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/reachability_report.py"
click node_relative_url "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/relative_url_resolver.py"
click node_url_components "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/url_component_extractor.py"
click node_url_classifier "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/url_uri_classifier.py"
click node_authenticator "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/simple_authenticator.py"
click node_protected_page "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/protected_page_simulation.py"
click node_url_encoder "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/url_encoder_decoder.py"
click node_proxy_configuration "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_configuration.py"
click node_proxy_failure "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_failure_handling.py"
click node_proxy_selection "https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_selection.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_helpdesk_client,node_helpdesk_server,node_secure_helpdesk_client,node_secure_helpdesk_server,node_transport_compare,node_user toneBlue
class node_tool_runner,node_port_scanner,node_reachability_checker toneAmber
class node_host_resolver,node_ip_classifier,node_local_host,node_interface_lister,node_network_devices,node_reachability_report toneMint
class node_relative_url,node_url_components,node_url_classifier,node_authenticator,node_protected_page,node_url_encoder toneRose
class node_proxy_configuration,node_proxy_failure,node_proxy_selection,node_network,node_dns,node_local_os,node_system_tools toneIndigo
```

## Components

### Helpdesk Sockets

- [Helpdesk Client](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_python.py): `network_programming/case_study1/helpdesk_python.py`
- [Helpdesk Server](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_python.py): `network_programming/case_study1/helpdesk_python.py`
- [Secure Client](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/secure_client.py): `network_programming/case_study1/secure_client.py`
- [Secure Helpdesk](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/helpdesk_secure_python.py): `network_programming/case_study1/helpdesk_secure_python.py`
- [TCP UDP Compare](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study1/tcp_udp_compare.py): `network_programming/case_study1/tcp_udp_compare.py`

### Network Diagnostics

- [Tool Runner](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/network_tool_runner.py): `network_programming/case_study2/network_tool_runner.py`
- [Port Scanner](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/port_scanner.py): `network_programming/case_study2/port_scanner.py`
- [Reachability Checker](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study2/reachability_checker.py): `network_programming/case_study2/reachability_checker.py`

### Host And Interfaces

- [Host Resolver](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/host_resolver.py): `network_programming/case_study3/host_resolver.py`
- [IP Classifier](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/ip_classifier.py): `network_programming/case_study3/ip_classifier.py`
- [Local Host Info](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study3/local_host_info.py): `network_programming/case_study3/local_host_info.py`
- [Interface Lister](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/interface_lister.py): `network_programming/case_study4/interface_lister.py`
- [Network Devices](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/network_devices.py): `network_programming/case_study4/network_devices.py`
- [Reachability Report](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study4/reachability_report.py): `network_programming/case_study4/reachability_report.py`

### URL And Access

- [Relative URL Resolver](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/relative_url_resolver.py): `network_programming/case_study5/relative_url_resolver.py`
- [URL Component Extractor](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/url_component_extractor.py): `network_programming/case_study5/url_component_extractor.py`
- [URL URI Classifier](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study5/url_uri_classifier.py): `network_programming/case_study5/url_uri_classifier.py`
- [Authenticator](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/simple_authenticator.py): `network_programming/Case_study6/simple_authenticator.py`
- [Protected Page Simulation](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/protected_page_simulation.py): `network_programming/Case_study6/protected_page_simulation.py`
- [URL Encoder Decoder](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/Case_study6/url_encoder_decoder.py): `network_programming/Case_study6/url_encoder_decoder.py`

### Proxy Policies

- [Proxy Configuration](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_configuration.py): `network_programming/case_study7/proxy_configuration.py`
- [Proxy Failure Handling](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_failure_handling.py): `network_programming/case_study7/proxy_failure_handling.py`
- [Proxy Selection](https://github.com/wanjeri-mj/network_programming/blob/main/network_programming/case_study7/proxy_selection.py): `network_programming/case_study7/proxy_selection.py`

### Other components

- **User**
- **Network Hosts**
- **DNS Service**
- **Local OS**
- **System Tools**

## Connections

- User → Helpdesk Client: enters issue (evidence: `network_programming/case_study1/helpdesk_python.py`)
- Helpdesk Client → Helpdesk Server: sends request (evidence: `network_programming/case_study1/helpdesk_python.py`)
- Helpdesk Server → Helpdesk Client: returns ticket (evidence: `network_programming/case_study1/helpdesk_python.py`)
- User → Secure Client: enters issue (evidence: `network_programming/case_study1/secure_client.py`)
- Secure Client → Secure Helpdesk: sends request
- User → TCP UDP Compare: runs example
- User → Tool Runner: runs tools (evidence: `network_programming/case_study2/network_tool_runner.py`)
- Tool Runner → System Tools: executes commands (evidence: `network_programming/case_study2/network_tool_runner.py`)
- User → Port Scanner: enters host (evidence: `network_programming/case_study2/port_scanner.py`)
- Port Scanner → Network Hosts: probes ports (evidence: `network_programming/case_study2/port_scanner.py`)
- User → Reachability Checker: runs check
- User → Host Resolver: enters domain (evidence: `network_programming/case_study3/host_resolver.py`)
- Host Resolver → DNS Service: resolves addresses (evidence: `network_programming/case_study3/host_resolver.py`)
- User → IP Classifier: runs example
- User → Local Host Info: requests details (evidence: `network_programming/case_study3/local_host_info.py`)
- Local Host Info → Local OS: reads interfaces (evidence: `network_programming/case_study3/local_host_info.py`)
- User → Interface Lister: requests profiles (evidence: `network_programming/case_study4/interface_lister.py`)
- Interface Lister → Local OS: reads interface data (evidence: `network_programming/case_study4/interface_lister.py`)
- User → Network Devices: runs simulation (evidence: `network_programming/case_study4/network_devices.py`)
- User → Reachability Report: runs report
- User → Relative URL Resolver: supplies URL
- User → URL Component Extractor: supplies URL
- User → URL URI Classifier: supplies identifier (evidence: `network_programming/case_study5/url_uri_classifier.py`)
- User → Authenticator: enters credentials (evidence: `network_programming/Case_study6/simple_authenticator.py`)
- User → Protected Page Simulation: runs simulation
- User → URL Encoder Decoder: supplies URL
- User → Proxy Configuration: sets proxy
- User → Proxy Failure Handling: provides settings (evidence: `network_programming/case_study7/proxy_failure_handling.py`)
- User → Proxy Selection: enters target (evidence: `network_programming/case_study7/proxy_selection.py`)
