File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -587,3 +587,30 @@ File blob
587587}
588588```
589589</details >
590+
591+ ## Onion Support
592+
593+ Thanks [ antis11] ( https://github.com/antiss11 ) for an example
594+
595+ <details >
596+ <summary>Example</summary>
597+
598+ ``` js
599+ import { SocksProxyAgent } from ' socks-proxy-agent' ;
600+
601+ import FlibustaAPI from ' flibusta' ;
602+
603+ (async () => {
604+ // eslint-disable-next-line unicorn/no-unreadable-array-destructuring
605+ const [/* original value */ , /* path to the file */ , authorName ] = process .argv ;
606+
607+ const flibustaApi = new FlibustaAPI (' http://flibustaongezhld6dibs2dps6vm4nvqg2kp7vgowbu76tzopgnhazqd.onion' , {
608+ httpAgent: new SocksProxyAgent (' socks5h://127.0.0.1:9050' ),
609+ });
610+
611+ const searchAuthorsResult = await flibustaApi .getAuthors (authorName);
612+
613+ console .log (JSON .stringify (searchAuthorsResult, undefined , 2 ));
614+ })();
615+ ```
616+ </details >
You can’t perform that action at this time.
0 commit comments