Skip to content

Commit 22ef0ef

Browse files
authored
Merge pull request #11 from xenos1337/feature/vpn-capture-privacy
Feature/vpn capture privacy
2 parents 57836e6 + 785ddc5 commit 22ef0ef

41 files changed

Lines changed: 3333 additions & 196 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AirPlayServer/AirPlayServer.ico

-5.07 KB
Binary file not shown.

AirPlayServer/AirPlayServer.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ xcopy /y "$(SolutionDir)external\plist\lib\$(PlatformTarget)\*.dll" $(OutDir)</C
180180
</ItemDefinitionGroup>
181181
<ItemGroup>
182182
<ClCompile Include="AirPlayServer.cpp" />
183+
<ClCompile Include="CCleanFeedOutput.cpp" />
183184
<ClCompile Include="CAirServer.cpp" />
184185
<ClCompile Include="CAirServerCallback.cpp" />
185186
<ClCompile Include="CAutoLock.cpp" />
@@ -195,6 +196,7 @@ xcopy /y "$(SolutionDir)external\plist\lib\$(PlatformTarget)\*.dll" $(OutDir)</C
195196
</ItemGroup>
196197
<ItemGroup>
197198
<ClInclude Include="CAirServer.h" />
199+
<ClInclude Include="CCleanFeedOutput.h" />
198200
<ClInclude Include="CAirServerCallback.h" />
199201
<ClInclude Include="CAutoLock.h" />
200202
<ClInclude Include="CImGuiManager.h" />

AirPlayServer/AirPlayServer.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<ClCompile Include="AirPlayServer.cpp">
1919
<Filter>Source Files</Filter>
2020
</ClCompile>
21+
<ClCompile Include="CCleanFeedOutput.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
2124
<ClCompile Include="CAirServerCallback.cpp">
2225
<Filter>Source Files</Filter>
2326
</ClCompile>
@@ -59,6 +62,9 @@
5962
<ClInclude Include="CAirServerCallback.h">
6063
<Filter>Header Files</Filter>
6164
</ClInclude>
65+
<ClInclude Include="CCleanFeedOutput.h">
66+
<Filter>Header Files</Filter>
67+
</ClInclude>
6268
<ClInclude Include="CSDLPlayer.h">
6369
<Filter>Header Files</Filter>
6470
</ClInclude>

AirPlayServer/CAirServer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ bool getHostName(char hostName[512])
4242
return false;
4343
}
4444

45-
void CAirServer::start(CSDLPlayer* pPlayer, const char* serverName)
45+
void CAirServer::start(CSDLPlayer* pPlayer, const char* serverName,
46+
const char* password)
4647
{
4748
stop();
4849
m_pPlayer = pPlayer;
@@ -57,7 +58,7 @@ void CAirServer::start(CSDLPlayer* pPlayer, const char* serverName)
5758
} else {
5859
sprintf_s(finalServerName, 1024, "%s", hostName);
5960
}
60-
m_pServer = fgServerStart(finalServerName, 5001, 7001, m_pCallback);
61+
m_pServer = fgServerStart(finalServerName, 5001, 7001, m_pCallback, password);
6162
}
6263

6364
void CAirServer::stop()
@@ -68,10 +69,10 @@ void CAirServer::stop()
6869
}
6970
}
7071

71-
void CAirServer::restart(const char* serverName)
72+
void CAirServer::restart(const char* serverName, const char* password)
7273
{
7374
if (m_pPlayer != NULL) {
74-
start(m_pPlayer, serverName);
75+
start(m_pPlayer, serverName, password);
7576
}
7677
}
7778

AirPlayServer/CAirServer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ class CAirServer
1111
~CAirServer();
1212

1313
public:
14-
void start(CSDLPlayer* pPlayer, const char* serverName = NULL);
14+
void start(CSDLPlayer* pPlayer, const char* serverName = NULL,
15+
const char* password = NULL);
1516
void stop();
16-
void restart(const char* serverName);
17+
void restart(const char* serverName, const char* password = NULL);
1718
bool isRunning() const { return m_pServer != NULL; }
1819
float setVideoScale(float fRatio);
1920

AirPlayServer/CAirServerCallback.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ void CAirServerCallback::setVolume(float volume, const char* remoteName, const c
9999
}
100100
}
101101

102+
bool CAirServerCallback::requestPinApproval(const char* remoteAddress, const char* pin)
103+
{
104+
return m_pPlayer != NULL && m_pPlayer->requestPinApproval(remoteAddress, pin);
105+
}
106+
102107
double dbDuration = 10000;
103108
double dbPosition = 0;
104109
void CAirServerCallback::videoGetPlayInfo(double* duration, double* position, double* rate)

AirPlayServer/CAirServerCallback.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class CAirServerCallback : public IAirServerCallback
2323

2424
// Audio volume control (volume in dB: 0.0 = max, -144.0 = mute)
2525
virtual void setVolume(float volume, const char* remoteName, const char* remoteDeviceId);
26+
virtual bool requestPinApproval(const char* remoteAddress, const char* pin);
2627

2728
virtual void log(int level, const char* msg);
2829

2930
protected:
3031
CSDLPlayer* m_pPlayer;
3132
char m_chRemoteDeviceId[128];
3233
};
33-

0 commit comments

Comments
 (0)