liuxuan30 / autoddvpn

DD-WRT VPN, imported from autoddvpn on code.google.com
1 stars 0 forks source link

成功將 autoddvpn 寫入DDWRT韌體裡面了 #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

今晚辛苦總算沒有白費,autoddvpn又進步一大步了!

目前寫入 DDWRT rootfs的 /usr/local/bin/下

root@DD-WRT:/# ls -al /usr/local/bin/
drwxr-xr-x    2 root     root           55 Jul 18 19:40 .
drwxr-xr-x    3 root     root           30 Jul 18 19:39 ..
-rwxr-xr-x    1 root     root         1193 Jul 18 19:39 run-dev.sh
-rwxr-xr-x    1 root     root        46059 Jul 18 19:17 vpndown.sh
-rwxr-xr-x    1 root     root        56351 Jul 18 19:17 vpnup.sh

執行方式不再使用rc_firewall 而是使用rc_startup

nvram set rc_startup='/usr/local/bin/run-dev.sh'
nvram commit
reboot

重開機之後LOG如下

root@DD-WRT:/tmp# cat /tmp/autoddvpn.log 
[INFO#277] 01/Jan/1970:00:00:15 log starts
[INFO#277] 01/Jan/1970:00:00:15 modifying /tmp/pptpd_client/ip-up
[INFO#277] 01/Jan/1970:00:00:15 /tmp/pptpd_client/ip-up not exists, sleep 10sec.
[INFO#277] 01/Jan/1970:00:00:25 /tmp/pptpd_client/ip-up not exists, sleep 10sec.
[INFO#277] 01/Jan/1970:00:00:35 /tmp/pptpd_client/ip-up not exists, sleep 10sec.
[INFO#277] 01/Jan/1970:00:00:45 /tmp/pptpd_client/ip-up not exists, sleep 10sec.
[INFO#277] 01/Jan/1970:00:00:55 /tmp/pptpd_client/ip-up modified
[INFO#277] 01/Jan/1970:00:00:55 modifying /tmp/pptpd_client/ip-down
[INFO#277] 01/Jan/1970:00:00:55 /tmp/pptpd_client/ip-down modified
[INFO#277] 01/Jan/1970:00:00:55 ALL DONE. Let's wait for VPN being connected.

此時已經修改了 /tmp/pptpd_client/ip-up and /tmp/pptpd_client/ip-down
這兩個file正是chnroutes主要調整的地方。(再次感謝chnroutes的啟
發)

如此一來PPTP連上或斷開就會觸發相應的vpnup.sh and vpndown.sh

目前看起來相當不錯!

Original issue reported on code.google.com by pahud...@gmail.com on 18 Jul 2010 at 8:02

GoogleCodeExporter commented 9 years ago
看上去很好!但是请问还是按照这里的教程使用吗?
http://code.google.com/p/autoddvpn/wiki/HOWTO
服务器上的run.sh已经更新?cron那部分依然需要吗?

还是说之后会提供一个修改版的ddwrt固件下载呢?

Original comment by Specter...@gmail.com on 19 Jul 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Specter.Hi

今天我們做出很大的改進,有自制韌體的方式也有JFFS方式,�
��薦用JFFS方式試試看吧!

http://code.google.com/p/autoddvpn/wiki/jffs

Original comment by pahud...@gmail.com on 19 Jul 2010 at 9:22

GoogleCodeExporter commented 9 years ago
我也看到log文件里的信息了,可是怎么pptp怎么启动呢?我已�
��设置pptp 
client了,会自动吗?如果自动的话,我现在还是不能翻墙。

Original comment by yese...@gmail.com on 12 Nov 2010 at 7:44

GoogleCodeExporter commented 9 years ago
@yesen77

請先按照文件使用JFFS模式,先不要用自制韌體模式,自制韌�
��比較適合很熟悉DDWRT/autoddvpn的朋友,JFFS模式比較適合你。

如果還是有問題,請另開一個issue,並且詳細回報你的資訊。

Original comment by pahud...@gmail.com on 12 Nov 2010 at 10:10