Skip to content

mitmproxy instructions

eli edited this page Sep 8, 2022 · 31 revisions

Slightly more up-to-date & detailed instructions available on the s3s wiki page: https://github.com/frozenpandaman/s3s/wiki/mitmproxy-instructions


Note: The v1.4.1 update (released Sept. 2018) to the Nintendo Switch Online app targets a higher API level due to requirements from Google, which prevents mitmproxy from working on most Android 7.0+ devices. The v1.5.0 update (released Apr. 2019) also now prevents NSO from running on Android versions below 5.0. Therefore, mitmproxy can currently be run:

  • On iOS devices
  • On unrooted devices running Android 5.1.1 or 6.0 (either real or virtual/emulated)
  • On rooted devices running Android 7.0 or higher, with mitmproxy installed into the system certificate store – see Android Studio instructions

The following method can be used to intercept your phone's traffic to grab your iksm_session cookie from the app.

Obtaining your SplatNet cookie using mitmproxy

  1. Download mitmproxy by following the instructions for your operating system here. Releases for Mac, Windows, and Linux can be found here. If you're on macOS and have Homebrew installed, you can run brew install mitmproxy.

  2. Obtain your computer's internal IP address:
    (Mac) Run ipconfig getifaddr en0 (or en1) from Terminal, or option-click on the Wi-Fi icon in the menu bar.
    (Windows) Run ipconfig from Command Prompt/PowerShell and look under "IPv4 Address."

  3. Run mitmweb from the command line or by clicking on the downloaded file.

  4. Configure your phone's network settings:
    (Android) Go to Settings > Wi-Fi > long press to modify network. Set Proxy to "Manual" under advanced options. For Proxy hostname, enter your computer's internal IP from before and enter the port as 8080.
    (iOS) Go to Settings > Wi-Fi > tap on network name or info icon. Chose "Manual" under HTTP proxy. For Server, enter your computer's internal IP from before and enter the port as 8080.

  5. Go to http://mitm.it/ on your phone and download/install the certificate for your device (only needs to be done once). On iOS 10.3 and above, you'll also need to navigate to Settings > General > About > Certificate Trust Settings, and turn on trust under "Enable full trust for root certificates." For more information, see the certificates page on the mitmproxy docs website.

  6. Open the Nintendo Switch Online app (Android, iOS) on your phone, log in if you have not done so previously, and click on Splatoon 2 under Game-Specific Services.

  7. In the mitmweb tab that opened before, look for any line that begins with https://app.splatoon2.nintendo.net/api/. Grab the cookie value from the Request tab (in the format iksm_session=xxxxx where xxxxx is your cookie). Copy and paste this into the script when prompted. (Or, if the script exits from an "Invalid token" error, enter it manually by opening config.txt and inputting xxxxx as the value for cookie.)

  8. Return your phone Wi-Fi settings back to normal (i.e. set Proxy back to "None").

Clone this wiki locally