Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auth options as flags #2689

Open
chrisbgp opened this issue Jan 6, 2016 · 2 comments
Open

Add auth options as flags #2689

chrisbgp opened this issue Jan 6, 2016 · 2 comments
Labels
core:option-param-conf config, parameters, properties, options, shortcuts meta:feature-request

Comments

@chrisbgp
Copy link

chrisbgp commented Jan 6, 2016

Feature request as it works much better with scripts/aliases:

Add --user= and --pass= for http and maybe other network protocols...Much easier than entering it in the URL directly.

@ghost ghost added the meta:feature-request label Jan 12, 2016
@Akemi Akemi added the core:option-param-conf config, parameters, properties, options, shortcuts label Sep 21, 2019
@synnack
Copy link

synnack commented Jul 6, 2021

Would be nice to also have a configuration file to specify that for some (HTTP) targets, because modifying the URL every time you click a link gets a bit boring. :-)

@licentiapoetica
Copy link

I found a workaround but only if you host your own http server and have full access to its config.

You can do something like this in ngnix for example:

in your host.conf

map_hash_bucket_size 256;
map $http_user_agent $auth {
    default 0;
    "randstring" 1;
}

location /yourlocation/ {
    if ($auth = 0) {
        return 403;
    }
    # do stuff here
    proxy_pass http://backend;
}

then in your mpv config

--user-agent=randstring

you can then watch video files without having to pass http basic auth credentials each time, the only downside I found so far is that you cannot specify in mpv config to use this user agent only for a specific host group, this will be used everywhere, so use a random string or whatever you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:option-param-conf config, parameters, properties, options, shortcuts meta:feature-request
Projects
None yet
Development

No branches or pull requests

4 participants