feat: configurable proxy
feat: dont include yt-dlp and config
This commit is contained in:
parent
a4e457eb52
commit
ea12f95ec0
|
|
@ -133,4 +133,6 @@ dist
|
|||
data/
|
||||
cache/
|
||||
cacheStore/
|
||||
tmpStore/
|
||||
tmpStore/
|
||||
config.yml
|
||||
yt-dlp.sh
|
||||
|
|
@ -4,4 +4,9 @@ export type Config = {
|
|||
api_base_url: string;
|
||||
web_base_url: string;
|
||||
jwt_privkey: string;
|
||||
proxy: {
|
||||
host: string;
|
||||
port: number;
|
||||
protocol: string;
|
||||
};
|
||||
};
|
||||
|
|
@ -2,4 +2,5 @@ api_port: 33223
|
|||
api_base_url: http://localhost:33223
|
||||
web_port: 8888
|
||||
web_base_url: http://localhost:8888
|
||||
jwt_privkey: AfhrynxvaH7XevethWCLzzp3Xq49NpqeENdgVVPJnqKNfdAJFuRNdPosAJXYznez
|
||||
jwt_privkey: AfhrynxvaH7XevethWCLzzp3Xq49NpqeENdgVVPJnqKNfdAJFuRNdPosAJXYznez
|
||||
proxy: null
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
api_port: 33223
|
||||
api_base_url: http://localhost:33223
|
||||
web_port: 8888
|
||||
web_base_url: http://localhost:8888
|
||||
jwt_privkey: AfhrynxvaH7XevethWCLzzp3Xq49NpqeENdgVVPJnqKNfdAJFuRNdPosAJXYznez
|
||||
proxy: null
|
||||
|
|
@ -1,11 +1,8 @@
|
|||
import YTMusic from "ytmusic-api";
|
||||
import { config } from "../index.js";
|
||||
|
||||
const ytmApi = new YTMusic({
|
||||
proxy: {
|
||||
protocol: 'http',
|
||||
host: 'localhost',
|
||||
port: 12334
|
||||
}
|
||||
proxy: config.proxy
|
||||
});
|
||||
|
||||
ytmApi.initialize().then(() => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
yt-dlp --proxy socks5://localhost:12334 $@
|
||||
Loading…
Reference in New Issue