explaingit

semporia/tiktok-unlock

11,796JavaScriptAudience · generalComplexity · 3/5Setup · hard

TLDR

Configuration files and JavaScript rewrite scripts for iOS proxy apps that let iPhone users switch their TikTok region to Japan, South Korea, Taiwan, or the US without needing a foreign SIM card.

Mindmap

mindmap
  root((tiktok-unlock))
    What it does
      TikTok region switching
      HTTPS traffic rewriting
      No SIM card needed
    Supported Apps
      Quantumult X
      Shadowrocket
      Surge and Loon
    Regions
      Japan and South Korea
      Taiwan and United States
      Custom rule groups
    Setup
      Install certificate
      Enable HTTPS decryption
      Load config file
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Switch your TikTok region to Japan, South Korea, Taiwan, or the United States without changing your physical SIM card.

USE CASE 2

Load a pre-built configuration into Shadowrocket or Surge to access region-locked TikTok features like live streaming and posting.

USE CASE 3

Apply JavaScript rewrite rules that intercept and modify TikTok HTTPS traffic to change the region detection values on the fly.

Tech stack

JavaScript

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a paid iOS proxy app (Quantumult X, Surge, or Shadowrocket) and manual certificate installation for HTTPS traffic decryption.

In plain English

This repository provides configuration files and scripts that let iPhone users switch their TikTok region without needing a physical SIM card from another country. The technique relies on iOS proxy apps that can intercept and rewrite encrypted network requests. By modifying certain values in TikTok network traffic on the fly, the app is made to behave as if it is running in a different country, such as Japan, South Korea, Taiwan, or the United States. The repo supports four iOS proxy applications: Quantumult X, Loon, Surge, and Shadowrocket. For each app, the README provides step-by-step instructions in Chinese explaining how to install the required certificates, enable HTTPS decryption, and load the corresponding configuration files from this repository. Each supported country gets its own configuration file with the correct rewrite rules and traffic routing policies. Once configured, users can access TikTok features that are otherwise restricted by region, including watching and posting videos, going live, liking and commenting on content, and sending direct messages. A beginner note in the README explains why TikTok should be freshly installed after the proxy rules are in place, rather than before, to avoid an early detection that would make the rewrite scripts stop working. The repository also includes a note on Douyin, the Chinese version of TikTok, with routing rules for that app. Most of the README content is written in Traditional or Simplified Chinese. The JavaScript files in the repository contain the actual rewrite logic that the proxy apps execute when they intercept matching TikTok traffic.

Copy-paste prompts

Prompt 1
Walk me through setting up the semporia/tiktok-unlock Shadowrocket configuration on my iPhone, including installing the certificate, enabling HTTPS decryption, and loading the config file for the US region.
Prompt 2
Using the semporia/tiktok-unlock repo, give me step-by-step instructions to configure Surge on iOS so TikTok thinks I am in Japan, and explain what the rewrite rules actually change in the network traffic.
Prompt 3
Explain what the JavaScript rewrite scripts in semporia/tiktok-unlock do when they intercept TikTok HTTPS requests, which specific values or headers are they modifying and why does that change the region?
Prompt 4
I want to add a new country configuration to semporia/tiktok-unlock for Quantumult X. Show me how to write the config file based on the existing examples in the repository.
Prompt 5
What is the reason the semporia/tiktok-unlock README says TikTok should be freshly installed before the proxy rules are active, and what detection mechanism does installing it first bypass?
Open on GitHub → Explain another repo

← semporia on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.