Skip to content

Commit

Permalink
docs(template): script tag/name
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 28, 2024
1 parent 0f8a460 commit bc37213
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 64 deletions.
24 changes: 12 additions & 12 deletions template/egern.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -20,88 +20,88 @@ rules:
policy: REJECT
scriptings:
- http_request:
name: 'DualSubs.YouTube.Player.request.json'
name: '🍿️ DualSubs.YouTube.Player.request.json'
match: ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_response:
name: 'DualSubs.YouTube.Player.response.json'
name: '🍿️ DualSubs.YouTube.Player.response.json'
match: ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_request:
name: 'DualSubs.YouTube.Player.request.proto'
name: '🍿️ DualSubs.YouTube.Player.request.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
arguments:
_compat.$argument: ''
body_required: true
binary_body: true
- http_response:
name: 'DualSubs.YouTube.Player.response.proto'
name: '🍿️ DualSubs.YouTube.Player.response.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
binary_body: true
- http_response:
name: 'DualSubs.YouTube.GetWatch.response.proto'
name: '🍿️ DualSubs.YouTube.GetWatch.response.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
binary_body: true
- http_request:
name: 'DualSubs.YouTube.TimedText.request'
name: '🍿️ DualSubs.YouTube.TimedText.request'
match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
arguments:
_compat.$argument: ''
body_required: false
- http_response:
name: 'DualSubs.YouTube.Composite.TimedText.response'
name: '🍿️ DualSubs.YouTube.Composite.TimedText.response'
match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External)
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_response:
name: 'DualSubs.YouTube.Translate.TimedText.response'
name: '🍿️ DualSubs.YouTube.Translate.TimedText.response'
match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_request:
name: 'DualSubs.YouTubeMusic.Browse.request.json'
name: '🍿️ DualSubs.YouTubeMusic.Browse.request.json'
match: ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_request:
name: 'DualSubs.YouTube.Browse.request.proto'
name: '🍿️ DualSubs.YouTube.Browse.request.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$
script_url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
arguments:
_compat.$argument: ''
body_required: true
binary_body: true
- http_response:
name: 'DualSubs.YouTubeMusic.Translate.Lyrics.response.json'
name: '🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.json'
match: ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
_compat.$argument: ''
body_required: true
- http_response:
name: 'DualSubs.YouTubeMusic.Translate.Lyrics.response.proto'
name: '🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.proto'
match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
script_url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
arguments:
Expand Down
24 changes: 12 additions & 12 deletions template/loon.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@

[Script]
# YouTube
http-request ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.Player.request.json, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.YouTube.Player.response.json, argument={{{scriptParams}}}
http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.Player.request.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.YouTube.Player.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=DualSubs.YouTube.GetWatch.response.proto, argument={{{scriptParams}}}
http-request ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$ script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.TimedText.request, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, tag=DualSubs.YouTube.Composite.TimedText.response, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.YouTube.Translate.TimedText.response, argument={{{scriptParams}}}
http-request ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.YouTube.Player.request.json, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=🍿️ DualSubs.YouTube.Player.response.json, argument={{{scriptParams}}}
http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.YouTube.Player.request.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=🍿️ DualSubs.YouTube.Player.response.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js, tag=🍿️ DualSubs.YouTube.GetWatch.response.proto, argument={{{scriptParams}}}
http-request ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$ script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.YouTube.TimedText.request, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, tag=🍿️ DualSubs.YouTube.Composite.TimedText.response, argument={{{scriptParams}}}
http-response ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.YouTube.Translate.TimedText.response, argument={{{scriptParams}}}

# YouTube Music
http-request ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTubeMusic.Browse.request.json, argument={{{scriptParams}}}
http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=DualSubs.YouTube.Browse.request.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.YouTubeMusic.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=DualSubs.YouTubeMusic.Translate.Lyrics.response.proto, argument={{{scriptParams}}}
http-request ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.YouTubeMusic.Browse.request.json, argument={{{scriptParams}}}
http-request ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$ requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js, tag=🍿️ DualSubs.YouTube.Browse.request.proto, argument={{{scriptParams}}}
http-response ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.json, argument={{{scriptParams}}}
http-response ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate requires-body=1, binary-body-mode=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.proto, argument={{{scriptParams}}}

[MITM]
hostname = www.youtube.com, m.youtube.com, tv.youtube.com, music.youtube.com, youtubei.googleapis.com, -redirector*.googlevideo.com, *.googlevideo.com
24 changes: 12 additions & 12 deletions template/quantumultx.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@

#[Script]
# YouTube
# DualSubs.YouTube.Player.request.json
# 🍿️ DualSubs.YouTube.Player.request.json
^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Player.response.json
# 🍿️ DualSubs.YouTube.Player.response.json
^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$ url script-response-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
# DualSubs.YouTube.Player.request.proto
# 🍿️ DualSubs.YouTube.Player.request.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Player.response.proto
# 🍿️ DualSubs.YouTube.Player.response.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$ url script-response-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
# DualSubs.YouTube.GetWatch.response.proto
# 🍿️ DualSubs.YouTube.GetWatch.response.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$ url script-response-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
# DualSubs.YouTube.TimedText.request
# 🍿️ DualSubs.YouTube.TimedText.request
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext url script-request-header https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Composite.TimedText.response
# 🍿️ DualSubs.YouTube.Composite.TimedText.response
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External) url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
# DualSubs.YouTube.Translate.TimedText.response
# 🍿️ DualSubs.YouTube.Translate.TimedText.response
^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

# YouTube Music
# DualSubs.YouTubeMusic.Browse.request.json
# 🍿️ DualSubs.YouTubeMusic.Browse.request.json
^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTube.Browse.request.proto
# 🍿️ DualSubs.YouTube.Browse.request.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$ url script-request-body https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
# DualSubs.YouTubeMusic.Translate.Lyrics.response.json
# 🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.json
^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
# DualSubs.YouTubeMusic.Translate.Lyrics.response.proto
# 🍿️ DualSubs.YouTubeMusic.Translate.Lyrics.response.proto
^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

#[MITM]
Expand Down
32 changes: 16 additions & 16 deletions template/stash.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -27,82 +27,82 @@ http:
- ^https?:\/\/([\w-]+)\.googlevideo\.com\/initplayback(\?.*oad=.+)$ - reject
script:
- match: ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$
name: DualSubs.YouTube.request
name: 🍿️ DualSubs.YouTube.request
type: request
require-body: true
argument:
- match: ^https?:\/\/(www|m|tv)\.youtube\.com\/youtubei\/v1\/player(\?.+)?$
name: DualSubs.YouTube.response
name: 🍿️ DualSubs.YouTube.response
type: response
require-body: true
argument:
- match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$
name: DualSubs.YouTube.request
name: 🍿️ DualSubs.YouTube.request
type: request
require-body: true
binary-mode: true
argument:
- match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/player(\?.+)?$
name: DualSubs.YouTube.response
name: 🍿️ DualSubs.YouTube.response
type: response
require-body: true
binary-mode: true
argument:
- match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/get_watch(\?.+)?$
name: DualSubs.YouTube.response
name: 🍿️ DualSubs.YouTube.response
type: response
require-body: true
binary-mode: true
argument:
- match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext(\?.+)?$
name: DualSubs.YouTube.request
name: 🍿️ DualSubs.YouTube.request
type: request
require-body: false
argument:
- match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=(Official|External)
name: DualSubs.YouTube.Composite.TimedText.response
name: 🍿️ DualSubs.YouTube.Composite.TimedText.response
type: response
require-body: true
argument:
- match: ^https?:\/\/(www|m)\.youtube\.com\/api\/timedtext\?(.*)subtype=Translate
name: DualSubs.YouTube.Translate.TimedText.response
name: 🍿️ DualSubs.YouTube.Translate.TimedText.response
type: response
require-body: true
argument:

- match: ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse(\?.+)?$
name: DualSubs.YouTube.request
name: 🍿️ DualSubs.YouTube.request
type: request
require-body: true
argument:
- match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse(\?.+)?$
name: DualSubs.YouTube.request
name: 🍿️ DualSubs.YouTube.request
type: request
require-body: true
binary-mode: true
argument:
- match: ^https?:\/\/music\.youtube\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
name: DualSubs.YouTube.Translate.TimedText.response
name: 🍿️ DualSubs.YouTube.Translate.TimedText.response
type: request
require-body: true
argument:
- match: ^https?:\/\/youtubei\.googleapis\.com\/youtubei\/v1\/browse\?(.*)subtype=Translate
name: DualSubs.YouTube.Translate.TimedText.response
name: 🍿️ DualSubs.YouTube.Translate.TimedText.response
type: response
require-body: true
binary-mode: true
argument:

script-providers:
DualSubs.YouTube.request:
🍿️ DualSubs.YouTube.request:
url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/request.bundle.js
interval: 86400
DualSubs.YouTube.response:
🍿️ DualSubs.YouTube.response:
url: https://github.com/DualSubs/YouTube/releases/download/v{{@package 'version'}}/response.bundle.js
interval: 86400
DualSubs.YouTube.Composite.TimedText.response:
🍿️ DualSubs.YouTube.Composite.TimedText.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
interval: 86400
DualSubs.YouTube.Translate.TimedText.response:
🍿️ DualSubs.YouTube.Translate.TimedText.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
interval: 86400
Loading

0 comments on commit bc37213

Please sign in to comment.