Git Product home page Git Product logo

wifi-onrails's Introduction

WiFi-OnRails

This script provides various functionalities related to the SNCF WiFi inOui service, allowing users to manage their connection, check trip details, and configure DNS settings.

โš ๏ธ Compatibility: macOS and Linux only

Prerequisites

  • jq: A lightweight and flexible command-line JSON processor. It is used to parse JSON responses from SNCF WiFi APIs.
  • curl: A command-line tool and library for transferring data with URLs. It is used to make HTTP requests to SNCF WiFi APIs.
  • Network Setup Tool (networksetup): A command-line utility on macOS used to configure network settings, including DNS servers.

Usage

./wifi_sncf.sh [OPTION]

Options:

  • (no option): Displays the current DNS configuration and pings google.com.
  • -h: Displays help information.
  • -sncf: Uses the SNCF WiFi gateway as the DNS server and retrieves trip details.
  • -normandie: Uses the Normandie WiFi gateway as the DNS server and retrieves trip details.
  • -google: Uses Google DNS servers as the DNS servers.
  • -nextdns: Sets DNS to go through NextDNS only.

Example Usage:

$ ./wifi_sncf.sh -sncf

Output:

DNS config:
10.122.0.1

Pinging google.com: NOK

Status: true (identifier has existing grant)

Granted Bandwidth: 9.76 MB/s
Remaining Data: 106.15 MB
Consumed Data: 893.84 MB
Data Remaining: 10%
Next Reset: 2024-04-01 11:49:35

Connection already activated.

WiFi Quality: 5/5
Number of Devices Connected: 126
Train speed: 82.598 km/h
Train altitude: 356.63 meters

Trip percentage: 91%
Number of Stops: 1
Final destination: Grenoble
Theoretical Arrival: 13:13
Real Arrival: 13:18
Delayed stops: Grenoble is delayed by 5 minutes

Bar queue is not empty

Acknowledgments

Thanks to Vulpine Citrus for insights into the SNCF WiFi API.

wifi-onrails's People

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.