https://github.com/rjouhann/wifi-onrails
This script manages SNCF WiFi inOui service, enabling connection management, trip detail checks, and DNS configuration.
https://github.com/rjouhann/wifi-onrails
dns france inoui sncf wifi
Last synced: 4 months ago
JSON representation
This script manages SNCF WiFi inOui service, enabling connection management, trip detail checks, and DNS configuration.
- Host: GitHub
- URL: https://github.com/rjouhann/wifi-onrails
- Owner: rjouhann
- Created: 2024-03-29T12:06:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T13:24:25.000Z (over 1 year ago)
- Last Synced: 2025-06-10T22:46:23.486Z (4 months ago)
- Topics: dns, france, inoui, sncf, wifi
- Language: Shell
- Homepage: https://wifi.sncf
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
./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](https://my.nextdns.io) only.## Example Usage:
```bash
$ ./wifi_sncf.sh -sncf
```**Output:**
```
DNS config:
10.122.0.1Pinging 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:35Connection already activated.
WiFi Quality: 5/5
Number of Devices Connected: 126
Train speed: 82.598 km/h
Train altitude: 356.63 metersTrip percentage: 91%
Number of Stops: 1
Final destination: Grenoble
Theoretical Arrival: 13:13
Real Arrival: 13:18
Delayed stops: Grenoble is delayed by 5 minutesBar queue is not empty
```## Acknowledgments
Thanks to [Vulpine Citrus](https://vulpinecitrus.info/blog/the-sncf-wifi-api) for insights into the SNCF WiFi API.