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

[功能改进]: emby增加内网地址和外网地址 #280

Open
GavinIves opened this issue Sep 14, 2023 · 3 comments
Open

[功能改进]: emby增加内网地址和外网地址 #280

GavinIves opened this issue Sep 14, 2023 · 3 comments

Comments

@GavinIves
Copy link

GavinIves commented Sep 14, 2023

当前程序版本

3.2.7

功能改进

目前emby只有一个内网地址 希望可以增加一个外网地址 这样可以在外面自动使用域名和https跳转到emby 在内网直接http+ip 因为我家里只有公网ipv6 所以在有ipv6的地方我可以通过外网访问 当外面没有ipv6 我只能通过wiregurd回家内网 此时我需要内网地址才能访问 目前我通过加js来实现 但是目前在线观看还没有实现 希望能通过后端实现
实现的界面
image
但是这里还没实现
image

  async function example() {
    var count=0
    while (count < 5) {
        ishost=0
        if (!window.location.href.includes("xxx.xxx")) {
            var hyperlinks = document.querySelectorAll('a.card[href*="xxx.xxx.xxx:20001"]');
            for (let i = 0; i < hyperlinks.length; i++) {
                ishost=1
                let href = hyperlinks[i].getAttribute('href');
                href = href.replace('https://xxx.xx.xx:20001', 'http://10.123.1.105:10001');
                hyperlinks[i].setAttribute('href', href);
            }
            if (ishost===0){
                count++
            }
        } else {
            break
        }
        await new Promise(resolve => setTimeout(resolve, 100))
    }
}
example()

参考资料

No response

@jackloves111
Copy link
Contributor

难道你看剧都是先打开nastool进入而不是用emby进入?

@GavinIves
Copy link
Author

GavinIves commented Sep 16, 2023 via email

@GavinIves
Copy link
Author

难道你看剧都是先打开nastool进入而不是用emby进入?

可以帮忙加一下这个功能吗 对于我还挺有用的

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

2 participants