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

绑定了ip后无法上传 #41

Open
JarmoHu opened this issue Sep 5, 2020 · 4 comments
Open

绑定了ip后无法上传 #41

JarmoHu opened this issue Sep 5, 2020 · 4 comments

Comments

@JarmoHu
Copy link

JarmoHu commented Sep 5, 2020

我的aria2是用的隧道代理下载,其中用的设置如下

multiple-interface=192.168.100.2,2001:470:1f14:594::2
bt-lpd-interface=192.168.100.2

然后绑完之后就无法自动上传upload.sh

@JarmoHu
Copy link
Author

JarmoHu commented Sep 6, 2020

已经找到BUG原因,在core文件中的READ_ARIA2_CONF()函数中有这么一行
RPC_ADDRESS="localhost:${RPC_PORT}/jsonrpc"
里面直接用的localhost,这里我把它改成了aria2.conf里面绑定的ip就好了

@P3TERX
Copy link
Owner

P3TERX commented Sep 8, 2020

我没这样用过,所以没考虑到这个情况。等有空了研究下有没有更优雅的解决方案。

@JarmoHu
Copy link
Author

JarmoHu commented Sep 8, 2020

我没这样用过,所以没考虑到这个情况。等有空了研究下有没有更优雅的解决方案。

是的,我觉得这对于多IP的主机来说有必要的,aria2的设置里面有绑定IP设置,所以需要读取aria2.conf里的设置

@JarmoHu
Copy link
Author

JarmoHu commented Oct 18, 2020

经检查,发现在"tracker.sh"的102行里面也有这个问题。

ADD_TRACKERS_LOCAL_RPC() {
    if [ ! -f ${ARIA2_CONF} ]; then
        echo -e "$(DATE_TIME) ${ERROR} '${ARIA2_CONF}' does not exist."
        exit 1
    else
        RPC_PORT=$(grep ^rpc-listen-port ${ARIA2_CONF} | cut -d= -f2-)
        RPC_SECRET=$(grep ^rpc-secret ${ARIA2_CONF} | cut -d= -f2-)
        [[ ${RPC_PORT} ]] || {
            echo -e "$(DATE_TIME) ${ERROR} Aria2 configuration file incomplete."
            exit 1
        }
        RPC_ADDRESS="localhost:${RPC_PORT}/jsonrpc"
        echo -e "$(DATE_TIME) ${INFO} Adding BT trackers to Aria2 ..." && echo
        ADD_TRACKERS_RPC_STATUS
    fi
}

但是修改本地文件无法使之生效,因为“aria2.sh”都是调用的在线脚本运行的

bash <(wget -qO- git.io/tracker.sh) ${aria2_conf}

所以我建议通过“script.conf"对变量进行管理

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