Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
581 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
package com.subgraph.orchid; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import com.subgraph.orchid.ConsensusDocument.RequiredCertificate; | ||
import com.subgraph.orchid.data.HexDigest; | ||
import com.subgraph.orchid.directory.downloader.DirectoryRequestFailedException; | ||
|
||
public interface DirectoryDownloader { | ||
void start(Directory directory); | ||
RouterDescriptor downloadBridgeDescriptor(Router bridge); | ||
|
||
RouterDescriptor downloadBridgeDescriptor(Router bridge) throws DirectoryRequestFailedException; | ||
|
||
ConsensusDocument downloadCurrentConsensus(boolean useMicrodescriptors) throws DirectoryRequestFailedException; | ||
ConsensusDocument downloadCurrentConsensus(boolean useMicrodescriptors, DirectoryCircuit circuit) throws DirectoryRequestFailedException; | ||
|
||
List<KeyCertificate> downloadKeyCertificates(Set<RequiredCertificate> required) throws DirectoryRequestFailedException; | ||
List<KeyCertificate> downloadKeyCertificates(Set<RequiredCertificate> required, DirectoryCircuit circuit) throws DirectoryRequestFailedException; | ||
|
||
List<RouterDescriptor> downloadRouterDescriptors(Set<HexDigest> fingerprints) throws DirectoryRequestFailedException; | ||
List<RouterDescriptor> downloadRouterDescriptors(Set<HexDigest> fingerprints, DirectoryCircuit circuit) throws DirectoryRequestFailedException; | ||
|
||
List<RouterMicrodescriptor> downloadRouterMicrodescriptors(Set<HexDigest> fingerprints) throws DirectoryRequestFailedException; | ||
List<RouterMicrodescriptor> downloadRouterMicrodescriptors(Set<HexDigest> fingerprints, DirectoryCircuit circuit) throws DirectoryRequestFailedException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 0 additions & 116 deletions
116
src/com/subgraph/orchid/directory/downloader/AbstractDirectoryDownloadTask.java
This file was deleted.
Oops, something went wrong.
78 changes: 0 additions & 78 deletions
78
src/com/subgraph/orchid/directory/downloader/BridgeDescriptorDownloadTask.java
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/com/subgraph/orchid/directory/downloader/BridgeDescriptorFetcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.subgraph.orchid.directory.downloader; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
import com.subgraph.orchid.RouterDescriptor; | ||
import com.subgraph.orchid.directory.parsing.DocumentParser; | ||
|
||
public class BridgeDescriptorFetcher extends DocumentFetcher<RouterDescriptor>{ | ||
|
||
@Override | ||
String getRequestPath() { | ||
return "/tor/server/authority"; | ||
} | ||
|
||
@Override | ||
DocumentParser<RouterDescriptor> createParser(ByteBuffer response) { | ||
return PARSER_FACTORY.createRouterDescriptorParser(response, true); | ||
} | ||
} |
66 changes: 0 additions & 66 deletions
66
src/com/subgraph/orchid/directory/downloader/CertificateDownloadTask.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.