diff --git a/README.md b/README.md index d1fb474..58d8dea 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,18 @@ 위장해, 치지직이 윈도우에서 1080p 시청 시 요구하는 그리드(Grid) 설치 없이 1080p 화질을 시청할 수 있게 합니다. +위장은 두 레이어를 같은 값으로 맞춥니다. + +- **JS 레벨** (`content.js`): `navigator.userAgent`, `navigator.platform`, + `navigator.userAgentData` (메서드 `getHighEntropyValues` / `toJSON` 포함). +- **네트워크 레벨** (`rules.json` + declarativeNetRequest): 실제 HTTP 요청 + 헤더 `User-Agent`, `sec-ch-ua`, `sec-ch-ua-platform`, `sec-ch-ua-mobile` 을 + Mac 값으로 덮어씁니다. + +두 레이어 중 하나만 바꾸면 JS 와 서버가 보는 값이 어긋나, 치지직 핑거프린팅이 +**"허용되지 않는 비정상적 접근입니다."** 팝업을 띄울 수 있습니다. +1.2.1 부터 이 두 레이어를 함께 일관되게 위장합니다. + `userAgentData` 는 단순히 `brands` / `mobile` / `platform` 만 갈아끼우면 치지직이 로드하는 `nlog.js` (네이버 핑거프린팅 / 로깅) 가 `e.getHighEntropyValues is not a function` 으로 Uncaught TypeError 를 던집니다. @@ -17,7 +29,7 @@ 일관된 Mac 값으로 채워 둡니다. (manifest 의 `world: MAIN` + `run_at: document_start` 덕분에 페이지 스크립트보다 먼저 적용됩니다.) -구현: `content.js` +구현: `content.js`, `rules.json` ## 타임머신 강제 활성화는 지원하지 않습니다 @@ -51,8 +63,8 @@ ``` manifest.json 확장 정의 (MV3) -content.js 그리드 우회 (UA / platform / UA-CH 위장 + getHighEntropyValues) -rules.json declarativeNetRequest 규칙 (현재 비어 있음) +content.js 그리드 우회 JS 레벨 (UA / platform / UA-CH 위장 + getHighEntropyValues) +rules.json 그리드 우회 네트워크 레벨 (UA / sec-ch-ua* 헤더 modifyHeaders) popup.html/css/js 툴바 팝업 icons/ 확장 아이콘 ``` diff --git a/content.js b/content.js index 17c032d..202b611 100644 --- a/content.js +++ b/content.js @@ -1,6 +1,13 @@ // 치지직이 윈도우에서 1080p 시청 시 그리드 설치를 요구하는 것을 우회하기 위해 // navigator 의 OS/브라우저 식별 값들을 Mac 으로 위장한다. // +// 이 파일은 JS 레벨 (navigator.*) 만 다룬다. 실제 HTTP 요청 헤더 +// (User-Agent / sec-ch-ua / sec-ch-ua-platform / sec-ch-ua-mobile) 는 +// rules.json 의 declarativeNetRequest modifyHeaders 규칙이 똑같이 Mac 으로 +// 덮어쓴다. JS 와 네트워크 레벨 값이 어긋나면 치지직 핑거프린팅이 +// "비정상 접근" 으로 보고 팝업을 띄우므로 두 레이어가 반드시 같은 값을 +// 가져야 한다. +// // userAgentData 의 getHighEntropyValues 까지 구현해 두지 않으면 // 치지직이 로드하는 nlog.js (네이버 핑거프린팅 / 로깅) 가 // `e.getHighEntropyValues is not a function` 으로 Uncaught TypeError 를 던지고, diff --git a/manifest.json b/manifest.json index 73cc011..5970822 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Chzzk Bypass", - "version": "1.2.0", + "version": "1.2.1", "manifest_version": 3, "description": "치지직(CHZZK) 시청 환경 개선: Mac 위장으로 그리드 없이 1080p 시청.", "icons": { @@ -18,7 +18,8 @@ ], "host_permissions": [ "*://*.naver.com/*", - "*://*.ncloud.com/*" + "*://*.ncloud.com/*", + "*://*.pstatic.net/*" ], "declarative_net_request": { "rule_resources": [ diff --git a/rules.json b/rules.json index fe51488..86da734 100644 --- a/rules.json +++ b/rules.json @@ -1 +1,46 @@ -[] +[ + { + "id": 1, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [ + { + "header": "User-Agent", + "operation": "set", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" + }, + { + "header": "sec-ch-ua", + "operation": "set", + "value": "\"Chromium\";v=\"122\", \"Google Chrome\";v=\"122\", \"Not-A.Brand\";v=\"24\"" + }, + { + "header": "sec-ch-ua-mobile", + "operation": "set", + "value": "?0" + }, + { + "header": "sec-ch-ua-platform", + "operation": "set", + "value": "\"macOS\"" + } + ] + }, + "condition": { + "resourceTypes": [ + "main_frame", + "sub_frame", + "xmlhttprequest", + "script", + "stylesheet", + "image", + "media", + "font", + "websocket", + "ping", + "other" + ] + } + } +]