Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeQL: rename HydraLabVpnLogger file #669

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import java.io.FileWriter
import java.io.IOException
import kotlin.io.path.Path

class HydraLabVpnLogger(private var filePath: String?) {
class HydraLabVpnLoggerTemp(private var filePath: String?) {
private var lines = mutableListOf<String>()
private var linesStaging = listOf<String>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ object ToNetworkQueueWorker : Runnable {

private lateinit var vpnInput: FileChannel

private lateinit var vpnLogger: HydraLabVpnLogger
private lateinit var vpnLogger: HydraLabVpnLoggerTemp

var totalInputCount = 0L

fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLogger) {
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLoggerTemp) {
if (this::thread.isInitialized && thread.isAlive) throw IllegalStateException("Running already")
vpnInput = FileInputStream(vpnFileDescriptor).channel
vpnLogger = logger
Expand Down Expand Up @@ -107,9 +107,9 @@ object ToDeviceQueueWorker : Runnable {

private lateinit var vpnOutput: FileChannel

private lateinit var vpnLogger: HydraLabVpnLogger
private lateinit var vpnLogger: HydraLabVpnLoggerTemp

fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLogger) {
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLoggerTemp) {
if (this::thread.isInitialized && thread.isAlive) throw IllegalStateException("Is already running")
vpnOutput = FileOutputStream(vpnFileDescriptor).channel
vpnLogger = logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class HydraLabVpnService : VpnService() {

private lateinit var vpnInterface: ParcelFileDescriptor

private lateinit var vpnLogger: HydraLabVpnLogger
private lateinit var vpnLogger: HydraLabVpnLoggerTemp

override fun onCreate() {
UdpSendWorker.start(this)
Expand Down Expand Up @@ -62,7 +62,7 @@ class HydraLabVpnService : VpnService() {

private fun connect(config: VpnUserConfig) {
vpnInterface = createVpnInterface(config)
vpnLogger = HydraLabVpnLogger(config.dumpPath)
vpnLogger = HydraLabVpnLoggerTemp(config.dumpPath)
val fileDescriptor = vpnInterface.fileDescriptor
ToNetworkQueueWorker.start(fileDescriptor, vpnLogger)
ToDeviceQueueWorker.start(fileDescriptor, vpnLogger)
Expand Down
Loading