python - 修补 sshuttle 的 firewall.py -- IPFW 到 PF

标签 python

<分区>

是否有人修复了 sshuttle 的“firewall.py”以使用 PF 而不是 IPFW 进行 Yosemite 10.10 更新?

https://github.com/apenwarr/sshuttle
https://github.com/apenwarr/sshuttle/blob/master/firewall.py

我四处寻找修复方法,但似乎还没有可用的方法。我更喜欢 Rails,对 Python 不太了解。除了能够理解它之外,我不知道从哪里开始进行此更改并希望社区可以提供帮助,或者希望有人已经修复了一个分支。

最佳答案

更新:下面提到的拉取请求,一段时间后仍然失败。

原始答案

Philip Thrasher har 定稿 Fredrik Gustafsson's工作并创建了一个 pull request对于 sshuttle。

我试过了并且能够让它工作(至少对于传出连接)。我使用了这个脚本:

#/bin/bash
sudo echo "Installing PyXAPI"
curl -O http://www.pps.univ-paris-diderot.fr/~ylg/PyXAPI/PyXAPI-0.1.tar.gz
tar -xzvf PyXAPI-0.1.tar.gz
cd PyXAPI-0.1
./configure
make
sudo make install
cd ..

echo "Installing autossh"
brew update
brew install autossh

echo "Getting sshuttle"
git clone https://github.com/pthrasher/sshuttle.git
cd sshuttle/src/
echo "Please add '`pwd`' to your path or run 'alias sshuttle=`pwd`/sshuttle'"

之后我可以像往常一样运行它

sshuttle -r user@server 0.0.0.0/0 -vv

关于python - 修补 sshuttle 的 firewall.py -- IPFW 到 PF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26447080/

相关文章:

python - 使用 Boost.Python 通过引用/指针将 C++ 对象传递给 Python 解释器

python - 如何获取 numpy 函数 (ufunc) 参数

python - 如何在 Tkinter 中制作多个 key

python - 使用 python 创建 SSL 套接字

python - 如何定义多个错误处理语句?

基于公共(public)键合并 2 个字典列表的 Pythonic 方法

Python 从列表中选择一个文件

python - Matplotlib 分散 3d 颜色

python - Python csv.DictReader 的内存使用问题

python - 按列连接多个文件的最快方法 - Python