yi-ji / NeteaseMusicAbroad

Unblock regional restrictions for NeteaseCloudMusic on macOS/Linux. 网易云音乐macOS/Linux解除歌曲锁区限制。
The Unlicense
398 stars 40 forks source link

某次重启后失效Helper #25

Closed llafcode closed 5 years ago

llafcode commented 5 years ago

MACOS 10.14.2, 网易云版本:1.5.10 之前一直用的好好的,今天突然发现大部分歌又灰了~ 下面贴出运行NeteaseMusicProxy.py后的输出:

2018-12-18 14:32:07+0200 [-] Log opened.
2018-12-18 14:32:08+0200 [-] Traceback (most recent call last):
2018-12-18 14:32:08+0200 [-]   File "/Users/liu/anaconda3/lib/python3.7/site-packages/twisted/internet/tcp.py", line 1361, in startListening
2018-12-18 14:32:08+0200 [-]     skt.bind(addr)
2018-12-18 14:32:08+0200 [-] OSError: [Errno 48] Address already in use
2018-12-18 14:32:08+0200 [-] 
2018-12-18 14:32:08+0200 [-] During handling of the above exception, another exception occurred:
2018-12-18 14:32:08+0200 [-] 
2018-12-18 14:32:08+0200 [-] Traceback (most recent call last):
2018-12-18 14:32:08+0200 [-]   File "NeteaseMusicProxy.py", line 258, in <module>
2018-12-18 14:32:08+0200 [-]     reactor.listenTCP(32794, NeteaseMusicProxyFactory())
2018-12-18 14:32:08+0200 [-]   File "/Users/liu/anaconda3/lib/python3.7/site-packages/twisted/internet/posixbase.py", line 495, in listenTCP
2018-12-18 14:32:08+0200 [-]     p.startListening()
2018-12-18 14:32:08+0200 [-]   File "/Users/liu/anaconda3/lib/python3.7/site-packages/twisted/internet/tcp.py", line 1363, in startListening
2018-12-18 14:32:08+0200 [-]     raise CannotListenError(self.interface, self.port, le)
2018-12-18 14:32:08+0200 [-] twisted.internet.error.CannotListenError: Couldn't listen on any:32794: [Errno 48] Address already in use.
llafcode commented 5 years ago

补充: 尝试readme中的kill -9 `ps x | grep NeteaseMusic | awk '{print $1}'命令提示进程找不到; 自己运行lsof -i: 32974后看到如下进程:

COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
python3.7 11813  liu    8u  IPv4 0xf711237a63da1759      0t0  TCP *:32794 (LISTEN)

kill掉后重新运行Helper仍然无效,再次运行NeteaseMusicProxy.py得到同样输出。。进入死循环。。不知道哪里操作错误了

yi-ji commented 5 years ago
  1. 请先下载最新的NeteaseMusicAbroad
  2. 退出网易云音乐之后,不要点Helper,直接python NeteaseMusicProxy.py并启动网易云音乐看输出

ps. 以后只要双击Helper就会自动同时启动网易云音乐

llafcode commented 5 years ago

已下载最新软件。 退出网易云,关掉所有终端,杀掉相关进程后,运行python NeteaseMusicProxy.py后显示:

2018-12-18 15:59:48+0200 [-] Log opened.
2018-12-18 15:59:50+0200 [-] NeteaseMusicProxyFactory starting on 32794
2018-12-18 15:59:50+0200 [-] Starting factory <__main__.NeteaseMusicProxyFactory object at 0x102798ba8>

之后启动网易云(直接启动软件或运行helper自动启动)此处都没有新增输出,保持不变。 同时歌单中的歌依旧是灰的无法播放。

yi-ji commented 5 years ago

系统偏好设置 -> 网络 -> 高级 -> 代理 -> 自动代理配置 检查一下?是否变更了文件路径 https://music.163.com 能打开吗?打开网页的时候终端有输出吗?

llafcode commented 5 years ago

没有相关代理文件路径。 网页能打开。 不管做啥终端都没别的输出。

yi-ji commented 5 years ago

问题清楚了,手动设一下路径并勾选自动代理配置: file://这里贴你在pac文件目录下执行pwd得到的输出/NeteaseMusic.pac 比如我的是file:///Users/yiji/Documents/NeteaseMusicAbroad/NeteaseMusic.pac

yi-ji commented 5 years ago

如果能帮忙定位一下bug就最好了: 麻烦执行 /bin/bash -x run_Darwin.sh 贴一下输出

llafcode commented 5 years ago

谢谢。手动配置文件以后搞定了。请问下在什么情况下这里的配置会变呢?更新系统吗?我最近好像是更新了MAC系统。

另外执行你说的操作后输出如下:

++ get_network_service_name
+++ networksetup -listnetworkserviceorder
+++ grep 'Hardware Port'
++ services='(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
+++ echo '(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Ethernet'
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en4
++ '[' -n en4 ']'
+++ ifconfig en4
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPad USB'
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en6
++ '[' -n en6 ']'
+++ ifconfig en6
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname=Wi-Fi
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en0
++ '[' -n en0 ']'
+++ ifconfig en0
++ ifout='en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ echo 'en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ grep 'status: active'
++ rc=0
++ '[' 0 -eq 0 ']'
++ currentservice=Wi-Fi
++ read line
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPhone USB'
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en5
++ '[' -n en5 ']'
+++ ifconfig en5
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Bluetooth PAN'
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en3
++ '[' -n en3 ']'
+++ ifconfig en3
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Bridge'
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=bridge0
++ '[' -n bridge0 ']'
+++ ifconfig bridge0
++ ifout='bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ echo 'bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
++ '[' -n Wi-Fi ']'
++ echo Wi-Fi
+ network_service_name=Wi-Fi
+ print_log 'The change been made can be recovered at: System Preference -> Network -> Advanced -> Proxies -> Automatic Proxy Configuration.'
+ echo ''
+ echo The change been made can be recovered at: System Preference '->' Network '->' Advanced '->' Proxies '->' Automatic Proxy Configuration.
++ networksetup -getautoproxyurl Wi-Fi
++ head -1
++ awk -F :// '{print $2}'
+ pac_file=/Users/liu/Desktop/NeteaseMusicAbroad-master/NeteaseMusic.pac
+ '[' '!' -e /Users/liu/Desktop/NeteaseMusicAbroad-master/NeteaseMusic.pac ']'
+ networksetup -getautoproxyurl Wi-Fi
+ grep -q Yes
+ print_log 'All set, launching NeteaseMusic App now...'
+ echo ''
+ nohup python NeteaseMusicProxy.py
+ echo All set, launching NeteaseMusic App now...
+ print_log 'Don'\''t worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.'
+ echo ''
+ echo 'Don'\''t' worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.
+ nohup /Applications/NeteaseMusic.app/Contents/MacOS/NeteaseMusic
++ ps x
++ grep NeteaseMusicProxy
++ awk '{print $1;}'
++ head -1
appending output to nohup.out
+ pid=13118
+ true
+ sleep 60
^Z
[2]+  Stopped                 /bin/bash -x run_Darwin.sh
liudeMacBook-Pro:NeteaseMusicAbroad-master liu$ /bin/bash -x run_Darwin.sh
++ get_network_service_name
+++ networksetup -listnetworkserviceorder
+++ grep 'Hardware Port'
++ services='(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
+++ echo '(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Ethernet'
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en4
++ '[' -n en4 ']'
+++ ifconfig en4
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPad USB'
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en6
++ '[' -n en6 ']'
+++ ifconfig en6
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname=Wi-Fi
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en0
++ '[' -n en0 ']'
+++ ifconfig en0
++ ifout='en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ echo 'en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ grep 'status: active'
++ rc=0
++ '[' 0 -eq 0 ']'
++ currentservice=Wi-Fi
++ read line
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPhone USB'
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en5
++ '[' -n en5 ']'
+++ ifconfig en5
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Bluetooth PAN'
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en3
++ '[' -n en3 ']'
+++ ifconfig en3
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Bridge'
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=bridge0
++ '[' -n bridge0 ']'
+++ ifconfig bridge0
++ ifout='bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ echo 'bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
++ grep 'status: active'
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
++ '[' -n Wi-Fi ']'
++ echo Wi-Fi
+ network_service_name=Wi-Fi
+ print_log 'The change been made can be recovered at: System Preference -> Network -> Advanced -> Proxies -> Automatic Proxy Configuration.'
+ echo ''
+ echo The change been made can be recovered at: System Preference '->' Network '->' Advanced '->' Proxies '->' Automatic Proxy Configuration.
++ networksetup -getautoproxyurl Wi-Fi
++ head -1
++ awk -F :// '{print $2}'
+ pac_file=/Users/liu/Desktop/NeteaseMusicAbroad-master/NeteaseMusic.pac
+ '[' '!' -e /Users/liu/Desktop/NeteaseMusicAbroad-master/NeteaseMusic.pac ']'
+ networksetup -getautoproxyurl Wi-Fi
+ grep -q Yes
+ print_log 'All set, launching NeteaseMusic App now...'
+ echo ''
+ echo All set, launching NeteaseMusic App now...
+ nohup python NeteaseMusicProxy.py
+ print_log 'Don'\''t worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.'
+ echo ''
+ echo 'Don'\''t' worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.
+ nohup /Applications/NeteaseMusic.app/Contents/MacOS/NeteaseMusic
++ ps x
++ grep NeteaseMusicProxy
++ awk '{print $1;}'
++ head -1
appending output to nohup.out
+ pid=13118
+ true
+ sleep 60
++ ps x
++ grep MacOS/NeteaseMusic
++ wc -l
++ xargs
+ '[' 4 -eq 1 ']'
+ true
+ sleep 60

好像是一直在输出新东西,我过来写完回复以后输出又多了一些。

yi-ji commented 5 years ago

可能和更新系统有关…不好意思,可以麻烦先把自动代理设置勾选取消,并清除配置文件路径,然后再执行贴一下输出吗?

llafcode commented 5 years ago

没问题。清楚代理配置后输出如下:

++ get_network_service_name
+++ networksetup -listnetworkserviceorder
+++ grep 'Hardware Port'
++ services='(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
+++ echo '(Hardware Port: Thunderbolt Ethernet, Device: en4)
(Hardware Port: iPad USB, Device: en6)
(Hardware Port: Wi-Fi, Device: en0)
(Hardware Port: iPhone USB, Device: en5)
(Hardware Port: Bluetooth PAN, Device: en3)
(Hardware Port: Thunderbolt Bridge, Device: bridge0)'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Ethernet'
+++ echo '(Hardware' Port: Thunderbolt Ethernet, Device: 'en4)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en4
++ '[' -n en4 ']'
+++ ifconfig en4
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPad USB'
+++ echo '(Hardware' Port: iPad USB, Device: 'en6)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en6
++ '[' -n en6 ']'
+++ ifconfig en6
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname=Wi-Fi
+++ echo '(Hardware' Port: Wi-Fi, Device: 'en0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en0
++ '[' -n en0 ']'
+++ ifconfig en0
++ ifout='en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ echo 'en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether ac:bc:32:d4:21:7b 
    inet6 fe80::1078:8696:387a:5107%en0 prefixlen 64 secured scopeid 0x8 
    inet 132.72.234.70 netmask 0xfffff800 broadcast 132.72.239.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active'
++ grep 'status: active'
++ rc=0
++ '[' 0 -eq 0 ']'
++ currentservice=Wi-Fi
++ read line
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='iPhone USB'
+++ echo '(Hardware' Port: iPhone USB, Device: 'en5)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en5
++ '[' -n en5 ']'
+++ ifconfig en5
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Bluetooth PAN'
+++ echo '(Hardware' Port: Bluetooth PAN, Device: 'en3)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=en3
++ '[' -n en3 ']'
+++ ifconfig en3
++ ifout=
++ echo ''
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $2}'
++ sname='Thunderbolt Bridge'
+++ echo '(Hardware' Port: Thunderbolt Bridge, Device: 'bridge0)'
+++ awk -F '(, )|(: )|[)]' '{print $4}'
++ sdev=bridge0
++ '[' -n bridge0 ']'
+++ ifconfig bridge0
++ ifout='bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ echo 'bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 4a:00:04:77:63:a0 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive'
++ grep 'status: active'
++ rc=1
++ '[' 1 -eq 0 ']'
++ read line
++ '[' -n Wi-Fi ']'
++ echo Wi-Fi
+ network_service_name=Wi-Fi
+ print_log 'The change been made can be recovered at: System Preference -> Network -> Advanced -> Proxies -> Automatic Proxy Configuration.'
+ echo ''
+ echo The change been made can be recovered at: System Preference '->' Network '->' Advanced '->' Proxies '->' Automatic Proxy Configuration.
++ networksetup -getautoproxyurl Wi-Fi
++ head -1
++ awk -F :// '{print $2}'
+ pac_file=
+ '[' '!' -e ']'
+ networksetup -getautoproxyurl Wi-Fi
+ grep -q Yes
+ print_log 'Password is needed only for the first time.'
+ echo ''
+ echo Password is needed only for the first time.
++ pwd
+ networksetup -setautoproxyurl Wi-Fi file:///Users/liu/Desktop/NeteaseMusicAbroad-master/NeteaseMusic.pac
+ print_log 'All set, launching NeteaseMusic App now...'
+ echo ''
+ echo All set, launching NeteaseMusic App now...
+ print_log 'Don'\''t worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.'
+ echo ''
+ echo 'Don'\''t' worry about me, I will terminate myself a few seconds after you quit NeteaseMusic.
+ nohup python NeteaseMusicProxy.py
+ nohup /Applications/NeteaseMusic.app/Contents/MacOS/NeteaseMusic
++ ps x
++ grep NeteaseMusicProxy
++ awk '{print $1;}'
++ head -1
appending output to nohup.out
+ pid=13882
+ true
+ sleep 60

网易云音乐会自动启动。而且运行这个命令后我又看了下代理配置貌似自动配置好了。

yi-ji commented 5 years ago

谢谢。。有点谜,看来不好复现了。如果以后有问题再说吧!