Coder Social home page Coder Social logo

orchid's People

Contributors

adiantek avatar akwizgran avatar brl avatar jp-x-g avatar mhofstra avatar mikehearn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orchid's Issues

hidden service

Hello! I want to figure out is it real to start hiden service using this library? Can youanswer me here please?

Default Port and IP

Running the server but what's the default port and server so I can connect via a proxy?

How to build it from source?

Hello. Please give me instructions of how to build it from source. And where in i2p folder should I put it?

Thank you.

Please tag version 1.0.0 in GitHub

Please tag version 1.0.0 here if you consider it ready. This is important for packagers to identify released versions, given that there have been important changes since 0.9.1.

Add project description

Could you please add a short description here on GitHub of what Orchid is and what it does?

Circuits

Is it a problem with orchid or a problem with my game? Occassionally I get to connect to it and quickly get disconnected, sometimes I cant connect at all, and sometimes I play for like 15 minutes then get kicked off. Orchid is reporting something about port: (#)onion and about circuit lost and it wont rebuild it until I close out of the game and completely reopen it which is inconvenient for everybody. It would be awesome if there was a way to establish more than 1 circuit so I could have fallback circuits or to have it quickly renegotiate a circuit so it does not kick me from the game(the game has a 600ms tick time)

WARNING: Failed to download key certificates โ€ฆ 404 Not found

no matter what i do, orchid seems to stuck at
>>> [ 40% ]: Loading authority key certs

i get something like:

WARNING: Failed to download key certificates: Request /tor/keys/fp-sk/49015f787433103580e3b66a1707a00e60f2d15b-3a7aade32cc78a903bf1ea3222b8df61f9d5092b+ed03bb616eb2f60bec80151114bb25cef515b226-92c62b5bfa6c05c4533b839ca5ec2508b3153433+14c131dfc5c6f93646be72fa1401c02a8df2e8b4-6b927b1652524ee77c98eea4160da00b943c7568+e8a9c45ede6d711294fadf8e7951f4de6ca56b58-292252d59020b903943c025d96134575e1245adf to directory (none) returned error code: 404 Not found

all the time. i've tried different java versions (8/7), as well as different orchid versions (1.0.0, this one, and the bitcoinj version).

(i am quite certain, that i've tried orchid-?.?.?.jar in the past and it was actually working as expected).

New tor circuit?

How can I request a new Tor circuit (to change my output IP) from a started TorClient?
I do not found any documentation to help...
Thanks

Cannot build circuits because we don't have enough directory information

Hi All,
I start Orchid 1.0.0 and Orchid 1.2.1 but i got a message :
May 09, 2017 2:44:09 PM com.subgraph.orchid.TorClient start
INFO: Starting Orchid (version: 1.0.0)
May 09, 2017 2:44:09 PM com.subgraph.orchid.directory.DirectoryImpl loadFromStore
INFO: Loading cached network information from disk
May 09, 2017 2:44:09 PM com.subgraph.orchid.directory.DirectoryImpl loadFromStore
INFO: Loading certificates
May 09, 2017 2:44:09 PM com.subgraph.orchid.circuits.CircuitCreationTask checkCircuitsForCreation
INFO: Cannot build circuits because we don't have enough directory information

If you have any suggest for me in this issue ,Please, let me know !
Many thanks !

Setting JTorSocketFactoryImpl results into dead lock

Hey,

I'm new to github and I'm very interested in this project. I tried to set the SocketImpleFactory by this little script:

TorClient client = new TorClient();
client.start();
Socket.setSocketImplFactory(new JTorSocketImplFactory(client));

Unfortunately, it hangs. The problem is in "ConnectionImpl:connectSocket()". Here, a new Socket will be opened to init Tor, but it uses the "JTorSocketImpl" class instead of the original one. "TorClient:start" should block, until a circuit is created, but I don't know, how to do this the best way.

Add readme

There currently isn't very much documentation on how one might use this library in another application.

Informative readmes would allow developers to quickly integrate this library into their application

TorOutputStream improvments

Hey guys,

finally, I could use OrchIdSocketImplFactory as tunnel for any socket connections. I went into the problem that nothing was written to the OutputStream, but after disabling the OrchIdSocketImplFactory the program ran fine. I spent hours for debugging the streams and found two possible fixes.

The problem:

A ServerSocket, that accepts a client Socket instantiates a java.net.SocketOutputStream. This class extends FileOutputStream aand immediately writes the data received by the 2 "write" methods out. The "flush" method is empty and is also never called by the application. So if I write 3 bytes, 3 bytes are really written. This causes traffic by sending many small packets, but the stream doesn't wait until its fulfilled (512 bytes).

The fix:

@Override
public synchronized void write(int b) throws IOException {
    checkOpen();
    if(currentOutputCell == null)
        flushCurrentOutputCell();
    currentOutputCell.putByte(b);
    flushCurrentOutputCell();
}

public synchronized void write(byte[] data, int offset, int length) throws IOException {
    checkOpen();
    if(currentOutputCell == null)
        flushCurrentOutputCell();

    while(length > 0) {
        final int writeCount = Math.min(length, currentOutputCell.cellBytesRemaining());
        currentOutputCell.putByteArray(data, offset, writeCount);
        flushCurrentOutputCell();
        offset += writeCount;
        length -= writeCount;
    }
}

I didn't test the socks listener, may this cause any additional problems?

Tor issues

Hi,

I am very new to using Tor, so this may be a known problem. I am facing following issues with TorClient, for us the torClient hangs very often, Although this hang doesn't happen very frequently but it does happen repeatedly once in a day,
We have a application which queries whois information for millions of domains, I am copying the code snippet which shows how we use TorClient.

import com.subgraph.orchid.TorClient;
import com.subgraph.orchid.sockets.OrchidSocketFactory;
import org.apache.commons.net.whois.WhoisClient;

import java.io.IOException;

public class WhoisInformationMain {
    private static TorClientHelper torClientHelper;

static {
    try {
        torClientHelper = new TorClientHelper();
    } catch (InterruptedException ie) {
        System.exit(1);
    }
}

public static void main(String... args) {
    WhoisInformationMain whoisinformation = new WhoisInformationMain();
    WhoisClient whoisClient = new WhoisClient();
    whoisClient.setSocketFactory(torClientHelper.getTorSocketFactory());
    whoisClient.setDefaultTimeout(60000);
    String whoisdata = "";
    try {
        whoisClient.connect("com.whois-servers.net");
        whoisdata = whoisClient.query("abc.com");
        whoisClient.disconnect();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

private static class TorClientHelper {

    private final TorClient torClient;
    private final OrchidSocketFactory torSocketFactory;

    public TorClientHelper() throws InterruptedException {
        TorClient torClient = new TorClient();
        torClient.start();
        torClient.waitUntilReady();
        this.torClient = torClient;
        this.torSocketFactory = new OrchidSocketFactory(torClient);
    }


    public TorClient getTorClient() {
        return torClient;
    }

    public OrchidSocketFactory getTorSocketFactory() {
        return torSocketFactory;
    }
}

}
The sample application just shows how we use the TorClient, however in the real system we have 20 threads connecting to server and getting whois information for various domains.
when these threads hang, they show the same stack trace.

java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x000000063b231f98> (a java.lang.Object)
at java.lang.Object.wait(Object.java:503)
at com.subgraph.orchid.circuits.TorInputStream.getNextCell(TorInputStream.java:210)
at com.subgraph.orchid.circuits.TorInputStream.fillBuffer(TorInputStream.java:180)
at com.subgraph.orchid.circuits.TorInputStream.refillBufferIfNeeded(TorInputStream.java:173)
at com.subgraph.orchid.circuits.TorInputStream.read(TorInputStream.java:87)
- locked <0x000000063b231f98> (a java.lang.Object)
- locked <0x000000063b23c180> (a com.subgraph.orchid.circuits.TorInputStream)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
- locked <0x000000063b231fb0> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.read1(BufferedReader.java:205)
at java.io.BufferedReader.read(BufferedReader.java:279)
- locked <0x000000063b231fb0> (a java.io.InputStreamReader)
at org.apache.commons.net.finger.FingerClient.query(FingerClient.java:98)
at org.apache.commons.net.whois.WhoisClient.query(WhoisClient.java:85)

we use 0.13.5 version of bitcoinj-core.

Thanks in advance for pointers, suggestions etc.

Regards
Padma

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.