Skip to content

Commit

Permalink
Merge pull request #73 from compscidr/jason/traffic-accounting-2
Browse files Browse the repository at this point in the history
added traffic accounting to proxyserver
  • Loading branch information
compscidr authored Dec 20, 2024
2 parents e34dd41 + 5411502 commit 7e13672
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LinuxProxyClient(
staticLogger.debug("Using default server: 127.0.0.1 $DEFAULT_PORT")
val datagramChannel = DatagramChannel.open()
datagramChannel.configureBlocking(false)
datagramChannel.connect(InetSocketAddress("127.0.0.1", DEFAULT_PORT))
datagramChannel.connect(InetSocketAddress("10.0.0.114", DEFAULT_PORT))
LinuxProxyClient(datagramChannel = datagramChannel, packetDumper = packetDumper)
} else {
if (args.size != 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ class ProxyServer(
private val datagramChannel: DatagramChannel,
private val packetDumper: AbstractPacketDumper = DummyPacketDumper,
protector: VpnProtector = DummyProtector,
trafficAccounting: TrafficAccounting = DummyTrafficAccount,
) : ProxySessionManager {
private val logger = LoggerFactory.getLogger(javaClass)
private val isRunning = AtomicBoolean(false)
private val kAnonProxy = KAnonProxy(icmp, protector)
private val kAnonProxy = KAnonProxy(icmp, protector, trafficAccounting)
private val sessions = ConcurrentHashMap<InetSocketAddress, ProxySession>()

private lateinit var selector: Selector
Expand Down

0 comments on commit 7e13672

Please sign in to comment.