Giter Club home page Giter Club logo

Comments (18)

myisjon avatar myisjon commented on May 18, 2024

移植到安卓是可以得,不过需要android的系统获得权限,不然在你没法修改android的hosts文件.

发自 Windows 邮件

发件人: onewilk
发送时间: ‎2014‎年‎12‎月‎9‎日, ‎星期二 ‎23‎:‎24
收件人: txthinking/google-hosts

我看了readme,需要如下依赖

脚本依赖
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
nmap v6.46
dig v9.9.2-P2
curl (OpenSSL/1.0.1j) 7.37.0

原谅我Linux水平太差,shell只能看懂其中一点。。。
据我所知以上的大多依赖需要busybox的支持,现有脚本直接放到手机里面跑不起来。。。
想问下您有移植到android上的打算么,或者能帮我理解下实现么。。。


Reply to this email directly or view it on GitHub.

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

这个root权限肯定是必须的,但是我的问题是那些脚本依赖在android上面可以找到相应的使用方式吗?

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

前面三个
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
都可以用busybox内置的,但是后面三个没啊...

from google-hosts.

 avatar commented on May 18, 2024

cp google-hosts /system/etc

google-hosts: 从git hub down下来的hosts
/system/etc: 安卓系统目录

可以用 RE explore 拷贝

在 2014年12月10日 上午10:27,onewilk [email protected]写道:

这个root权限肯定是必须的,但是我的问题是那些脚本依赖在android上面可以找到相应的使用方式吗?


Reply to this email directly or view it on GitHub
#46 (comment)
.

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

我的意思是在手机端自行更新ip生成host文件并替换,这样不必太过依赖github并且国内其实有些地方的网络环境下无法直接打开github的...我个人又不想维护一个host

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

你说的这种我实际上已经写好了一个demo了,现在就在自用...

from google-hosts.

zhounanzhao avatar zhounanzhao commented on May 18, 2024

@onewilk 希望您可以把您做的开源。

from google-hosts.

txthinking avatar txthinking commented on May 18, 2024
  1. 第一次find.sh寻找IP生成output会比较慢, 因为要一个个测试IP
  2. 如果output目录已经有很多IP了, 若是不考虑IP的实时性, 后续select.sh会很快.

On Wed, Dec 10, 2014 at 3:26 PM, ZhouNanzhao [email protected]
wrote:

@onewilk https://github.com/onewilk 希望您可以把您做的开源。


Reply to this email directly or view it on GitHub
#46 (comment)
.

About Me: http://www.txthinking.com

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

@zhounanzhao 我现在只是下载下来然后替换哦,确定需要我就开出来

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

@txthinking 额...您还是没明白我的意思,我是想问,那几个脚本依赖库在android上面默认是没有的,我想问的是有啥办法解决依赖库的问题,不然您的脚本也没法执行啊...

from google-hosts.

zhounanzhao avatar zhounanzhao commented on May 18, 2024

@onewilk 这个开出来肯定是好事呢,我可以给您提供协助,如果你愿意的话。

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

@zhounanzhao 我现在想把@txthinking 的这个项目直接放到android端去执行自动查找可用ip然后替换host,现在的问题就是脚本的依赖
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
nmap v6.46
dig v9.9.2-P2
curl (OpenSSL/1.0.1j) 7.37.0
前面3个可以用busybox中的命令,但是后三个我找不到for android的版本,又不知道该怎么去改@txthinking 的script,没学过shell...
您能帮忙找到依赖库或者帮忙改成可在android执行的脚本吗?

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

@zhounanzhao 如果你只是想用替换功能,不如直接去用一个应用,中文下名字叫Hosts同步,安装后添加@txthinking 的源http://tx.txthinking.com/hosts到列表,然后更新合并就行了...

from google-hosts.

zhounanzhao avatar zhounanzhao commented on May 18, 2024

嗯嗯 我刚才查了一下你说的问题 如果命令busybox不提供的话 会很麻烦 有可能需要做移植。

from google-hosts.

zhounanzhao avatar zhounanzhao commented on May 18, 2024

我看到 这个其实是有 python版的 有没有可能直接使用python版的。

from google-hosts.

onewilk avatar onewilk commented on May 18, 2024

@zhounanzhao 那个python只是做了个下载host然后替换,这个就没必要了...

from google-hosts.

LGA1150 avatar LGA1150 commented on May 18, 2024

@onewilk
找不到for android版本的话,可自行用源码编译
我昨天就在手机上用c4droid编译了个tcping

from google-hosts.

txthinking avatar txthinking commented on May 18, 2024

目前即使通过其他语言重写部分功能, android 上第一次运行会很占资源

from google-hosts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.