常用设置;git代理+查看mac地址

时间:2024-03-09 21:11:09
git config --global http.proxy http://192.168.0.100:1087

修改mac地址,重启后失效
sudo ifconfig en0 lladdr d0:67:e5:2e:07:f1

修改路由表,同时使用有线网卡和无线网卡
netstat -nr 查看路由表
sudo route delete 0.0.0.0  删除默认路由
sudo route add -net 0.0.0.0 192.168.1.1 默认使用192.168.1.1网关
sudo route add 10.200.0.0 10.200.22.254 有线网卡使用该网关
sudo route add 10.0.1.0/24 10.200.22.254 其它网段指定网关

export http_proxy=http://192.168.139.1:1087
 export https_server="socks://127.0.0.1:1080"

Adding a route manually can be necessary sometimes. When on Linux, I know the command by head:(centos only)

1
sudo route add -net 10.67.0.0/16 gw 192.168.120.254

On the Mac the command is similar, but a bit different 

Just as a note to myself and anyone else interested:

1
sudo route -n add -net 192.168.1.0/24  10.8.0.1
 ubuntu add route

route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.254