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

新的版本在哪里保存rpc-secret? #473

Closed
nkta3m opened this issue Sep 21, 2018 · 10 comments
Closed

新的版本在哪里保存rpc-secret? #473

nkta3m opened this issue Sep 21, 2018 · 10 comments

Comments

@nkta3m
Copy link

nkta3m commented Sep 21, 2018

下载了最新的版本,在网页界面的设置--连接设置--主机里面输入rpc-secret=SECRET@localhost, 或是在密码令牌(可选)处输入SECRET,可以正确的连接aria2c,但是退出浏览器后,再打开,又要再次输入,如何才能输入一次后保存呢?以前的版本是在configuration.js里面修改,现在修改了这个文件也是无效。求帮助,谢谢。

Download the latest version, in the web interface settings - connection settings - enter rpc-secret=SECRET@localhost in the host, or enter SECRET at the password token (optional), i can connect aria2c correctly, but exit After the browser, open it again, and then enter it again. How can I save it after entering it once? The previous version was modified in configuration.js, and now modifying this file is also invalid. Ask for help, thank you.

@anthonyraymond
Copy link
Collaborator

It will be easier to help you if you could speak english. I believe most of the contributors to this projects don't speak this language.

@no1xsyzy
Copy link
Contributor

TL;DR: rpc-secret is not persisted and request to input each time I open WebUI.

Solution 1: try #417
Solution 2: clear cookie and localStorage for it

@lizhaode
Copy link

lizhaode commented Oct 3, 2018

@no1xsyzy
I tried to use config in uri. Thanks, it is work.

But!!!!
My uri like this
file:///Users/lizhao/Documents/webui-aria2/docs/index.html?host=xxx.xxx.xxx.xxx&port=8800&token=xxx

In my scene, I use webui-aria2 to link my remote aria2 server. So I need define my host, post and token parameter.
In the older version, I can change configuration.js to implement this.
But now, I can't find any configure file to define my parameter

I want to know, does any plan to set a configure file?

@no1xsyzy
Copy link
Contributor

no1xsyzy commented Oct 4, 2018

Found the problem. Packing caused it. configuration.js will not affect the packed version.
For temporary solution, clone an earlier commit or use bookmarks of browser to fill that easily.

@anthonyraymond Mark as bug report that configuration.js doesn't work because of #467.
For future contributors, note: many people used this project in file systems, so XHR will not be a solution.

@anthonyraymond
Copy link
Collaborator

anthonyraymond commented Oct 4, 2018

I don't understand why people stick to this configuration.js instead of using the authentication form (wich persists credential in localstorage)?
Am i missing something?

I don't need to rewrite rpc-secret everytime.

@no1xsyzy
Copy link
Contributor

no1xsyzy commented Oct 4, 2018

@anthonyraymond because file:// scheme doesn't support it. The only way to persist in file:// was configuration.js. It has been a long time that this project can be easily used without any server, so it can be used on the same computer when github.io is not accessible (for reasons like Internet censorship. Yes, I mean China).

@lizhaode
Copy link

lizhaode commented Oct 4, 2018

@anthonyraymond
As the @no1xsyzy write. I use my computer's index.html to open webui-aria2, and I use the configure file to store my aria2 server's ip, port, token. So I needs configuration.js , I really think use configuration.js is a good choice

@anthonyraymond
Copy link
Collaborator

@no1xsyzy i see. Didn't know people used to acces it that way. That's problematic then :/

@anthonyraymond
Copy link
Collaborator

Closing in favor of #472.

@YanceyChiew
Copy link

YanceyChiew commented Oct 8, 2018

Just open the app.js, search " (c = p && p.auth && p.auth.token ? p.auth.token : null),", find it and modify it to “(c = "xxxx-there is your own token-xxxx"),”.

在app.js中搜索上面提到的那行代码,修改成上面提到的格式,这样做对于直接从文件打开index.html有效,也没有别的影响,唯一的问题只是在输入token的元素内不会显示占位符,它直接就是空的。

            if (g && u.length)
              return (
                (g = !1),
                (p = u[0]),
                // (c = p && p.auth && p.auth.token ? p.auth.token : null),//modify this line
                (c = "yourToken"),
                e.init(p),
                void (h = setTimeout(v, t))
              );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants