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

network: Fetch based browser networking #1061

Merged
merged 11 commits into from
Jul 24, 2024
Merged

network: Fetch based browser networking #1061

merged 11 commits into from
Jul 24, 2024

Commits on Jul 15, 2024

  1. network: Fetch based browser networking

    Emulate a networking stack, intercept HTTP requests, serve
    them with fetch().  Enable by setting networking_proxy=fetch
    
    Somewhat fixes copy#198
    
    Just enough networking for http to work for package managers and
    net-boot. The networking stack just reflects the macaddress of
    packets it receives, so shouldnt be bothered by mac address
    changes. Services include:
    
    - ARP replies by establishing the gateways IP
    - DHCP server sending gateway, dns, and client-ip
      - Gateway: 192.168.86.1
      - Client: 192.168.86.100
      - Netmask: 255.255.255.0
    - UDP DNS server, all addresses resolve to: 192.168.87.1
    - NTP Server, giving out the current time from Date()
    - Replies to ICMP pings to any IP address
    - UDP echo server on port 8
    
    Limitations:
    - Request are limited by CORS rules, but CORS-proxies can work around
      this.
    - Redirects are handled transparently by fetch. The upside is sites that
      force an http->https upgrade appear to the VM to work over http.
    
    Future Work:
    - Allow HTTP requests from browser to be served by VM.
    - HTTPS support (maybe with help of a rust based TLS stack in WASM)
    - Support for POSTing binary data
    basicer committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    49db763 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10cf3ea View commit details
    Browse the repository at this point in the history
  3. Run devices tests in CI

    basicer committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    784d6ca View commit details
    Browse the repository at this point in the history
  4. - Refactor HTTP Handling out TCP pump

    - Add code to establishing TCP connection to VM
    - Cleanup
    basicer committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    90d90cc View commit details
    Browse the repository at this point in the history
  5. Allow multiple Ne2k adapters

    basicer committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    692b9ad View commit details
    Browse the repository at this point in the history
  6. masquerade

    basicer committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4862da8 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Update to new code style.

    basicer committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    d58a0b7 View commit details
    Browse the repository at this point in the history
  2. Test feedback

    basicer committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4f6546e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6518770 View commit details
    Browse the repository at this point in the history
  4. Actually allow tests to fail

    basicer committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8df028f View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. some cleanup

    copy committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    78de372 View commit details
    Browse the repository at this point in the history