使用CURL和TOR作为CentOs上的代理(Using CURL with TOR as a Proxy on CentOs)
我想在CentOS机器上使用Tor作为curl或wget的 HTTP请求的代理。 我使用了这个方法,我在stackexchange和stackoverflow上寻找了一些答案。 https://medium.com/the-sysadmin/using-tor-for-your-shell-script-fee9d8bdef5c#.9ixz30jbn
如果我输入我的shell'tor',我会得到这个:
Aug 31 21:01:29.871 [notice] Tor v0.2.8.6 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2h and Zlib 1.2.8. Aug 31 21:01:29.871 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Aug 31 21:01:29.871 [notice] Read configuration file "/home/wmjio5f6/.linuxbrew/etc/tor/torrc". Aug 31 21:01:29.909 [warn] ControlPort is open, but no authentication method has been configured. This means that any program on your computer can reconfigure your Tor. That's bad! You should upgrade your Tor controller as soon as possible. Aug 31 21:01:29.937 [notice] Opening Socks listener on 127.0.0.1:9050 Aug 31 21:01:29.939 [notice] Opening Control listener on 127.0.0.1:9151 Aug 31 21:01:29.000 [notice] Parsing GEOIP IPv4 file /home/wmjio5f6/.linuxbrew/Cellar/tor/0.2.8.6/share/tor/geoip. Aug 31 21:01:30.000 [notice] Parsing GEOIP IPv6 file /home/wmjio5f6/.linuxbrew/Cellar/tor/0.2.8.6/share/tor/geoip6. Aug 31 21:01:30.000 [notice] Bootstrapped 0%: Starting Aug 31 21:01:31.000 [notice] Bootstrapped 80%: Connecting to the Tor network Aug 31 21:01:32.000 [notice] Bootstrapped 85%: Finishing handshake with first hop Aug 31 21:01:32.000 [notice] Bootstrapped 90%: Establishing a Tor circuit Aug 31 21:01:32.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. Aug 31 21:01:32.000 [notice] Bootstrapped 100%: Done
我的错误在哪里,或者哪个命令是正确的?
I want to use Tor as a proxy for HTTP-requests with curl or wget on a CentOS Machine. I used this How-to and I looked for some answers on stackexchange and stackoverflow. https://medium.com/the-sysadmin/using-tor-for-your-shell-script-fee9d8bdef5c#.9ixz30jbn
If I typing into my shell 'tor' I get this:
Aug 31 21:01:29.871 [notice] Tor v0.2.8.6 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2h and Zlib 1.2.8. Aug 31 21:01:29.871 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Aug 31 21:01:29.871 [notice] Read configuration file "/home/wmjio5f6/.linuxbrew/etc/tor/torrc". Aug 31 21:01:29.909 [warn] ControlPort is open, but no authentication method has been configured. This means that any program on your computer can reconfigure your Tor. That's bad! You should upgrade your Tor controller as soon as possible. Aug 31 21:01:29.937 [notice] Opening Socks listener on 127.0.0.1:9050 Aug 31 21:01:29.939 [notice] Opening Control listener on 127.0.0.1:9151 Aug 31 21:01:29.000 [notice] Parsing GEOIP IPv4 file /home/wmjio5f6/.linuxbrew/Cellar/tor/0.2.8.6/share/tor/geoip. Aug 31 21:01:30.000 [notice] Parsing GEOIP IPv6 file /home/wmjio5f6/.linuxbrew/Cellar/tor/0.2.8.6/share/tor/geoip6. Aug 31 21:01:30.000 [notice] Bootstrapped 0%: Starting Aug 31 21:01:31.000 [notice] Bootstrapped 80%: Connecting to the Tor network Aug 31 21:01:32.000 [notice] Bootstrapped 85%: Finishing handshake with first hop Aug 31 21:01:32.000 [notice] Bootstrapped 90%: Establishing a Tor circuit Aug 31 21:01:32.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. Aug 31 21:01:32.000 [notice] Bootstrapped 100%: Done
Where is my error, or wich command is the right?
原文:https://stackoverflow.com/questions/39257293
最满意答案
从Android中的数据库填充UI的最佳方法是使用
CursorLoader
。 尝试在这里阅读开发指南 。基本上,你实现了
LoaderManager.Callbacks
,并在onCreate
中查询数据库并将响应传递给加载器。the best way of populating the UI from a DB in Android is with a
CursorLoader
. try reading the dev-guide here.basically, you implement the
LoaderManager.Callbacks
, and in theonCreate
, query the DB and pass the response to the loader.
相关问答
更多-
使用Listview和Sqlite(Using Listview and Sqlite)[2022-03-07]
您需要编写数据库方法以从sqlite数据库中删除行。 这是一些代码片段 public void RemoveRow(String id){ SQLiteDatabase sqliteDB = dbHelper.getReadableDatabase(); String query = "DELETE FROM Stock WHERE stock_id='"+id+"'"; sqliteDB.execSQL(query); } 并在listview onClick方法中调用此方法 @ ... -
返回一个Cursor例如: getList()从你的另一个类到当前的ListView类。 objItem = new Contacts(this); this.cur = objItem.getList(); this.startManagingCursor(this.cur); ListAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cur, new String[ ...
-
看代码很难找到问题。 我能做到的是: 尝试检查您是否已正确创建数据库。 如果您的数据库是正确的,那么如果要从列表视图对象中的数据库获取数据,请尝试调试。 如果您要获取数据,则可能是您没有在列表视图中正确设置数据。 研究Activity的生命周期,它可以帮助您了解视图在什么情况下的行为。 如果您在调试代码时遇到任何问题,请告诉我。 Looking at the code its hard to find the issue. What i can make it out is: Try to check if ...
-
由于错误非常明显是语法错误,因此在ORDER BY display_nameCOLLATE LOCALIZED ASC之后缺少空格 替换如下 String sortOrder = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC"; As error is very clear its a syntax error, space is missing after display_name in ORDER BY display ...
-
从Android中的数据库填充UI的最佳方法是使用CursorLoader 。 尝试在这里阅读开发指南 。 基本上,你实现了LoaderManager.Callbacks ,并在onCreate中查询数据库并将响应传递给加载器。 the best way of populating the UI from a DB in Android is with a CursorLoader. try reading the dev-guide here. basically, you implement the L ...
-
将List
填充到android ListView中,给出不同的值(Populating List [2022-03-17]into android ListView giving different value) 打开ArrayAdapter ,然后从第405行到第410行读取 final T item = getItem(position); if (item instanceof CharSequence) { text.setText((CharSequence) item); } else { text.setText(item.toString()); } 你在做什么: 如果你的项目是String Adpater.getView(params)将使用它,否则它将使用item.toStrin ... -
请先关注一些简单的教程,一些好的教程是: 1- 简单的例子 2- 来自SQLiteDatabase的数据列表视图 Please follow some simple tutorials first, some good tutorials are: 1- Simple Example 2- ListView of Data from SQLiteDatabase
-
尝试将数据绑定到listview,如下所示: List
contact = new ArrayList (); contact=getAllContacts(); ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, contact); listContent.setAdapter(adapter); Try to bind the data i ... -
空指针总是让我得到XML中元素的id所以也可以在那里检查。 但是对于列表视图的简单游标适配器,请尝试以下操作 带有结果的光标表单数据库查询 db.open(); db.getAllRecipes(); Cursor cursor2 = db.getAllRecipes(); //String[] columns = column names from database String[] columns = new String[] {column nam ...
-
我不知道DataHolder ,我不知道它是否真的由sqlite DB支持,但这感觉就像是误用 - 你可能想要将ListView中的每个项目作为一个单独的行插入到你的表中。 但是,如果您只是想要一个快速的解决方法来使其工作,您可以只拆分您正在阅读的字符串,例如: if(rcfData.size() !=0) { String s = rcfData.get("dateTime"); // Remove brackets s = s.substring(1, s.length() - ...