123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- clog = console.log
-
-
- lbry_iglob = {
- new_int_orig:[
- "https://api.lbry.com/user/new",
- {
- "method": "POST",
- "headers": {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- "body": "auth_token=&language=en&app_id=odyseecom692EAWhtoqDuAfQ6KHMXxFxt8tkhmt7sfprEMHWKjy5hf6PwZcHDV542V"
- },
- ],
-
-
- new_int:[
- "/ign4/indx/ws_dev/new.js",
- {
- "method": "GET",
- // "method": "POST",
- "headers": {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- // "body": "auth_token=&language=en&app_id=odyseecom692EAWhtoqDuAfQ6KHMXxFxt8tkhmt7sfprEMHWKjy5hf6PwZcHDV542V"
- },
-
- ],
-
- replace_fetch:{
- "https://api.lbry.com/user/new":{
- nt:[
- "/ign4/indx/ws_dev/new.js",
- {
- "method": "GET",
- // "method": "POST",
- "headers": {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- // "body": "auth_token=&language=en&app_id=odyseecom692EAWhtoqDuAfQ6KHMXxFxt8tkhmt7sfprEMHWKjy5hf6PwZcHDV542V"
- },
-
- ],
- },
- "https://api.lbry.com/file/list_filtered?auth_token=":{
- nt:[
- "/ign4/libs/list_filtered.json?auth_token=",
- {
- "method": "GET"
- }
-
- ],
- },
- "https://api.lbry.com/file/list_blocked?auth_token=":{
- nt:[
- "/ign4/libs/list_blocked.json?auth_token=",
- {
- "method": "GET"
- }
-
- ],
- },
-
- },
-
- }
-
- function maybe_replace_t(t){
- clog("maybe_replace_t2:",t,t[0])
- if (t[0] in lbry_iglob.replace_fetch ){
- clog("maybe_replace_t t[0]",t)
- return lbry_iglob.replace_fetch[t[0]].nt
- }
- return t
- }
-
- rfns2_ = {
-
- rfn_apply(){
- clog("RFN:apply")
- return Reflect.apply(...arguments)
- },
- rfn_construct(){
- clog("RFN:construct")
- return Reflect.construct(...arguments)
- },
- rfn_defineProperty(){
- clog("RFN:defineProperty")
- return Reflect.defineProperty(...arguments)
- },
- rfn_deleteProperty(){
- clog("RFN:deleteProperty")
- return Reflect.deleteProperty(...arguments)
- },
- rfn_get(){
- clog("RFN:get",[...arguments])
- return Reflect.get(...arguments)
- },
- rfn_getOwnPropertyDescriptor(){
- clog("RFN:getOwnPropertyDescriptor")
- return Reflect.getOwnPropertyDescriptor(...arguments)
- },
- rfn_getPrototypeOf(){
- clog("RFN:getPrototypeOf")
- return Reflect.getPrototypeOf(...arguments)
- },
- rfn_has(){
- clog("RFN:has")
- return Reflect.has(...arguments)
- },
- rfn_isExtensible(){
- clog("RFN:isExtensible")
- return Reflect.isExtensible(...arguments)
- },
- rfn_ownKeys(){
- clog("RFN:ownKeys")
- return Reflect.ownKeys(...arguments)
- },
- rfn_preventExtensions(){
- clog("RFN:preventExtensions")
- return Reflect.preventExtensions(...arguments)
- },
- rfn_set(){
- clog("RFN:set")
- return Reflect.set(...arguments)
- },
- rfn_setPrototypeOf(){
- clog("RFN:setPrototypeOf")
- return Reflect.setPrototypeOf(...arguments)
- },
-
- }
- Response_orig = Response
- Response_p = new Proxy(Response,rfns2_)
- // Response = new Proxy(Response,rfns2_)
-
-
- rfns =rfns2_
-
- rprox2 = {
- apply: rfns.rfn_apply,
- construct: rfns.rfn_construct,
-
- defineProperty: rfns.rfn_defineProperty,
- deleteProperty: rfns.rfn_deleteProperty,
- get: rfns.rfn_get,
- getOwnPropertyDescriptor: rfns.rfn_getOwnPropertyDescriptor,
- getPrototypeOf: rfns.rfn_getPrototypeOf,
- has: rfns.rfn_has,
- isExtensible: rfns.rfn_isExtensible,
- ownKeys: rfns.rfn_ownKeys,
- preventExtensions: rfns.rfn_preventExtensions,
- set: rfns.rfn_set,
- setPrototypeOf: rfns.rfn_setPrototypeOf,
-
- }
-
-
-
- function proxy_rsp(t){
- clog("rfn.")
- var ret =new Proxy(t,rprox2)
- // ret.z
- return ret
- }
-
-
- /*
- {
- "method": "POST",
- "headers": {
- "Content-Type": "application/x-www-form-urlencoded"
- },
- "body": "auth_token=&language=en&app_id=odyseecom692EAWhtoqDuAfQ6KHMXxFxt8tkhmt7sfprEMHWKjy5hf6PwZcHDV542V"
- }
- */
-
-
-
- // https://api.lbry.com/user/new
-
- /*
- [
- "https://api.lbry.tv/api/v1/proxy?m=status",
- {
- "method": "POST",
- "headers": {
- "Content-Type": "application/json-rpc"
- },
- "body": "{\"jsonrpc\":\"2.0\",\"method\":\"status\",\"params\":{},\"id\":1619731308841}"
- }
- ]
-
-
- [
- "https://api.lbry.com/file/list_filtered?auth_token=",
- {
- "method": "GET"
- }
- ]
-
- [
- "https://api.lbry.com/file/list_blocked?auth_token=",
- {
- "method": "GET"
- }
- ]
- */
|