Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
0e8783d354 | |||
4012d00695 | |||
f7991631a5 | |||
16f7a5f77d | |||
7198737089 | |||
fee0160e64 | |||
b40b674c5c | |||
a3bf259fee | |||
97925d060a | |||
a78a719e8c | |||
cdd764bb61 | |||
8242a9c742 | |||
1375c3a258 | |||
b599626bbf | |||
a890cf687e | |||
b5c4b9628f | |||
44380b31f3 | |||
c738a01ce4 | |||
31819abcaf | |||
846a32ee7e | |||
3b7e78193a | |||
3971a8ab24 | |||
1c752847d9 | |||
1754dd8385 | |||
acd33bbbad | |||
004ca7c62c |
68
.gitignore
vendored
68
.gitignore
vendored
@ -1,67 +1 @@
|
|||||||
|
cmake-build-debug/
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
||||||
|
|
||||||
# User-specific stuff
|
|
||||||
.idea/**/workspace.xml
|
|
||||||
.idea/**/tasks.xml
|
|
||||||
.idea/**/usage.statistics.xml
|
|
||||||
.idea/**/dictionaries
|
|
||||||
.idea/**/shelf
|
|
||||||
|
|
||||||
# Generated files
|
|
||||||
.idea/**/contentModel.xml
|
|
||||||
|
|
||||||
# Sensitive or high-churn files
|
|
||||||
.idea/**/dataSources/
|
|
||||||
.idea/**/dataSources.ids
|
|
||||||
.idea/**/dataSources.local.xml
|
|
||||||
.idea/**/sqlDataSources.xml
|
|
||||||
.idea/**/dynamic.xml
|
|
||||||
.idea/**/uiDesigner.xml
|
|
||||||
.idea/**/dbnavigator.xml
|
|
||||||
|
|
||||||
# Gradle
|
|
||||||
.idea/**/gradle.xml
|
|
||||||
.idea/**/libraries
|
|
||||||
|
|
||||||
# Gradle and Maven with auto-import
|
|
||||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
||||||
# since they will be recreated, and may cause churn. Uncomment if using
|
|
||||||
# auto-import.
|
|
||||||
# .idea/modules.xml
|
|
||||||
# .idea/*.iml
|
|
||||||
# .idea/modules
|
|
||||||
|
|
||||||
# CMake
|
|
||||||
cmake-build-*/
|
|
||||||
|
|
||||||
# Mongo Explorer plugin
|
|
||||||
.idea/**/mongoSettings.xml
|
|
||||||
|
|
||||||
# File-based project format
|
|
||||||
*.iws
|
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
out/
|
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
|
||||||
|
|
||||||
# JIRA plugin
|
|
||||||
atlassian-ide-plugin.xml
|
|
||||||
|
|
||||||
# Cursive Clojure plugin
|
|
||||||
.idea/replstate.xml
|
|
||||||
|
|
||||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
||||||
com_crashlytics_export_strings.xml
|
|
||||||
crashlytics.properties
|
|
||||||
crashlytics-build.properties
|
|
||||||
fabric.properties
|
|
||||||
|
|
||||||
# Editor-based Rest Client
|
|
||||||
.idea/httpRequests
|
|
||||||
|
|
||||||
# Android studio 3.1+ serialized cache file
|
|
||||||
.idea/caches/build_file_checksums.ser
|
|
371
.idea/workspace.xml
generated
371
.idea/workspace.xml
generated
@ -1,371 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="BookmarkManager">
|
|
||||||
<bookmark url="file://$PROJECT_DIR$/src/Logger.cpp" line="41" mnemonic="2" />
|
|
||||||
</component>
|
|
||||||
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
|
|
||||||
<generated>
|
|
||||||
<config projectName="iprefresher" targetName="iprefresher" />
|
|
||||||
</generated>
|
|
||||||
</component>
|
|
||||||
<component name="CMakeSettings">
|
|
||||||
<configurations>
|
|
||||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
|
||||||
</configurations>
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="59c80f39-2468-4db0-9afd-14b8acdbffed" name="Default Changelist" comment="deleted cmake files">
|
|
||||||
<change afterPath="$PROJECT_DIR$/src/Logger.cpp" afterDir="false" />
|
|
||||||
<change afterPath="$PROJECT_DIR$/src/Logger.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/API.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/API.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.cpp" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<ignored path="$PROJECT_DIR$/cmake-build-debug/" />
|
|
||||||
<ignored path="$PROJECT_DIR$/CMakeFiles/" />
|
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="ClangdSettings">
|
|
||||||
<option name="formatViaClangd" value="false" />
|
|
||||||
</component>
|
|
||||||
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
|
|
||||||
<component name="FileEditorManager">
|
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/API.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="210">
|
|
||||||
<caret line="14" column="124" selection-start-line="14" selection-start-column="124" selection-end-line="14" selection-end-column="124" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#95#112#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/API.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="281">
|
|
||||||
<caret line="44" column="17" selection-start-line="44" selection-start-column="17" selection-end-line="44" selection-end-column="17" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Hashmap.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/main.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="289">
|
|
||||||
<caret line="29" column="41" lean-forward="true" selection-start-line="29" selection-start-column="41" selection-end-line="29" selection-end-column="41" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#19#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Logger.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="555">
|
|
||||||
<caret line="37" column="38" lean-forward="true" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#40#58#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/dynurefresher.log">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Logger.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="150">
|
|
||||||
<caret line="10" column="38" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="38" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="424">
|
|
||||||
<caret line="38" column="23" selection-start-line="38" selection-start-column="23" selection-end-line="38" selection-end-column="23" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
</leaf>
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="IdeDocumentHistory">
|
|
||||||
<option name="CHANGED_PATHS">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/API.h" />
|
|
||||||
<option value="$PROJECT_DIR$/main.cpp" />
|
|
||||||
<option value="$PROJECT_DIR$/API.cpp" />
|
|
||||||
<option value="$PROJECT_DIR$/CMakeLists.txt" />
|
|
||||||
<option value="$PROJECT_DIR$/.gitignore" />
|
|
||||||
<option value="$PROJECT_DIR$/src/API.cpp" />
|
|
||||||
<option value="$PROJECT_DIR$/src/Logger.h" />
|
|
||||||
<option value="$PROJECT_DIR$/src/main.cpp" />
|
|
||||||
<option value="$PROJECT_DIR$/src/Logger.cpp" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectFrameBounds" extendedState="6">
|
|
||||||
<option name="x" value="1020" />
|
|
||||||
<option name="y" value="236" />
|
|
||||||
<option name="width" value="1914" />
|
|
||||||
<option name="height" value="1051" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectView">
|
|
||||||
<navigator proportions="" version="1">
|
|
||||||
<foldersAlwaysOnTop value="true" />
|
|
||||||
</navigator>
|
|
||||||
<panes>
|
|
||||||
<pane id="ProjectPane">
|
|
||||||
<subPane>
|
|
||||||
<expand>
|
|
||||||
<path>
|
|
||||||
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="cmake-build-debug" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
</expand>
|
|
||||||
<select />
|
|
||||||
</subPane>
|
|
||||||
</pane>
|
|
||||||
<pane id="Scope" />
|
|
||||||
</panes>
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
||||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
|
||||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="RecentsManager">
|
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
|
||||||
<recent name="$PROJECT_DIR$/src" />
|
|
||||||
</key>
|
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
|
||||||
<recent name="$PROJECT_DIR$" />
|
|
||||||
</key>
|
|
||||||
</component>
|
|
||||||
<component name="RunDashboard">
|
|
||||||
<option name="ruleStates">
|
|
||||||
<list>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
<RuleState>
|
|
||||||
<option name="name" value="StatusDashboardGroupingRule" />
|
|
||||||
</RuleState>
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="RunManager">
|
|
||||||
<configuration name="iprefresher" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="iprefresher" TARGET_NAME="iprefresher" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="iprefresher" RUN_TARGET_NAME="iprefresher">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
<component name="SvnConfiguration">
|
|
||||||
<configuration />
|
|
||||||
</component>
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="59c80f39-2468-4db0-9afd-14b8acdbffed" name="Default Changelist" comment="" />
|
|
||||||
<created>1556620677257</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1556620677257</updated>
|
|
||||||
<workItem from="1556620678990" duration="5234000" />
|
|
||||||
<workItem from="1556646880233" duration="656000" />
|
|
||||||
<workItem from="1556710548728" duration="6200000" />
|
|
||||||
<workItem from="1557047487321" duration="761000" />
|
|
||||||
<workItem from="1557061811880" duration="5098000" />
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00001" summary="edited api class and made it to work">
|
|
||||||
<created>1557063528491</created>
|
|
||||||
<option name="number" value="00001" />
|
|
||||||
<option name="presentableId" value="LOCAL-00001" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1557063528491</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00002" summary="edited api class and made it to work">
|
|
||||||
<created>1557063846200</created>
|
|
||||||
<option name="number" value="00002" />
|
|
||||||
<option name="presentableId" value="LOCAL-00002" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1557063846200</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00003" summary="deleted cmake files">
|
|
||||||
<created>1557063931807</created>
|
|
||||||
<option name="number" value="00003" />
|
|
||||||
<option name="presentableId" value="LOCAL-00003" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1557063931807</updated>
|
|
||||||
</task>
|
|
||||||
<option name="localTasksCounter" value="4" />
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TimeTrackingManager">
|
|
||||||
<option name="totallyTimeSpent" value="17949000" />
|
|
||||||
</component>
|
|
||||||
<component name="ToolWindowManager">
|
|
||||||
<frame x="1919" y="0" width="1922" height="1081" extended-state="6" />
|
|
||||||
<editor active="true" />
|
|
||||||
<layout>
|
|
||||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26040554" />
|
|
||||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
|
||||||
<window_info id="Favorites" order="2" side_tool="true" />
|
|
||||||
<window_info anchor="bottom" id="Message" order="0" />
|
|
||||||
<window_info anchor="bottom" id="Find" order="1" />
|
|
||||||
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.31875" />
|
|
||||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
|
||||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
|
||||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
|
||||||
<window_info anchor="bottom" id="TODO" order="6" />
|
|
||||||
<window_info anchor="bottom" id="Database Changes" order="7" />
|
|
||||||
<window_info anchor="bottom" id="Messages" order="8" weight="0.32708332" />
|
|
||||||
<window_info anchor="bottom" id="Terminal" order="9" />
|
|
||||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
|
||||||
<window_info anchor="bottom" id="Version Control" order="11" />
|
|
||||||
<window_info anchor="bottom" id="CMake" order="12" weight="0.32834226" />
|
|
||||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
|
||||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
|
||||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
|
||||||
<window_info anchor="right" id="Database" order="3" />
|
|
||||||
</layout>
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="1" />
|
|
||||||
</component>
|
|
||||||
<component name="VcsManagerConfiguration">
|
|
||||||
<MESSAGE value="edited api class and made it to work" />
|
|
||||||
<MESSAGE value="deleted cmake files" />
|
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="deleted cmake files" />
|
|
||||||
</component>
|
|
||||||
<component name="editorHistoryManager">
|
|
||||||
<entry file="file://$PROJECT_DIR$/test.cpp" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/test.h" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake_install.cmake" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/iprefresher.cbp" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="135">
|
|
||||||
<caret line="9" column="19" selection-start-line="9" selection-start-column="19" selection-end-line="9" selection-end-column="19" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/API.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="210">
|
|
||||||
<caret line="14" column="124" selection-start-line="14" selection-start-column="124" selection-end-line="14" selection-end-column="124" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#95#112#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Hashmap.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="424">
|
|
||||||
<caret line="38" column="23" selection-start-line="38" selection-start-column="23" selection-end-line="38" selection-end-column="23" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/API.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="281">
|
|
||||||
<caret line="44" column="17" selection-start-line="44" selection-start-column="17" selection-end-line="44" selection-end-column="17" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/out.myfile">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="15">
|
|
||||||
<caret line="1" column="6" selection-start-line="1" selection-start-column="6" selection-end-line="1" selection-end-column="6" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Logger.h">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="150">
|
|
||||||
<caret line="10" column="38" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="38" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/dynurefresher.log">
|
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/Logger.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="555">
|
|
||||||
<caret line="37" column="38" lean-forward="true" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#40#58#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/main.cpp">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="289">
|
|
||||||
<caret line="29" column="41" lean-forward="true" selection-start-line="29" selection-start-column="41" selection-end-line="29" selection-end-column="41" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#19#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,16 +1,28 @@
|
|||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.7)
|
||||||
project(iprefresher)
|
project(iprefresher)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
include_directories(${CURL_INCLUDE_DIR})
|
include_directories(${CURL_INCLUDE_DIR})
|
||||||
|
|
||||||
|
|
||||||
set(SOURCE src/main.cpp src/API.h src/API.cpp src/Hashmap.h src/Logger.cpp src/Logger.h)
|
set(SOURCE
|
||||||
|
src/main.cpp
|
||||||
|
|
||||||
|
src/api/API.h
|
||||||
|
src/api/API.cpp
|
||||||
|
|
||||||
|
src/api/Hashmap.h
|
||||||
|
|
||||||
|
src/Logger.cpp
|
||||||
|
src/Logger.h
|
||||||
|
|
||||||
|
src/api/TelegramAPI.cpp
|
||||||
|
src/api/TelegramAPI.h
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(iprefresher ${SOURCE})
|
add_executable(iprefresher ${SOURCE})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(iprefresher ${CURL_LIBRARIES})
|
target_link_libraries(iprefresher ${CURL_LIBRARIES})
|
||||||
|
|
||||||
|
install (TARGETS iprefresher DESTINATION bin)
|
||||||
|
85
README.md
Normal file
85
README.md
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# DynuIPRefresher
|
||||||
|
|
||||||
|
## Build
|
||||||
|
## Basic Build
|
||||||
|
Download source files
|
||||||
|
|
||||||
|
`git clone https://github.com/Lukas-Heiligenbrunner/DynuIPRefresher.git`
|
||||||
|
|
||||||
|
cd into downloaded files and Generate makefiles:
|
||||||
|
|
||||||
|
`cmake .`
|
||||||
|
|
||||||
|
compile project
|
||||||
|
|
||||||
|
`make`
|
||||||
|
|
||||||
|
install it to the system
|
||||||
|
|
||||||
|
`make install`
|
||||||
|
|
||||||
|
### Build a Debian package
|
||||||
|
Download source files
|
||||||
|
|
||||||
|
`git clone https://github.com/Lukas-Heiligenbrunner/DynuIPRefresher.git`
|
||||||
|
|
||||||
|
rename Project folder to lower case:
|
||||||
|
|
||||||
|
`mv DynuIPRefresher iprefresher-1.0`
|
||||||
|
|
||||||
|
`cd iprefresher-1.0`
|
||||||
|
|
||||||
|
remove .idea folder because it´s useless in this case:
|
||||||
|
|
||||||
|
`rm -Rf .idea`
|
||||||
|
|
||||||
|
pack source in a tar.gz archive
|
||||||
|
|
||||||
|
`tar -zcvf iprefresher-1.0.tar.gz *`
|
||||||
|
|
||||||
|
create debian/ folder and create example config files
|
||||||
|
|
||||||
|
`dh_make -f iprefresher-1.0.tar.gz`
|
||||||
|
|
||||||
|
recently packed archive is useless now, delete it
|
||||||
|
|
||||||
|
`rm iprefresher-1.0.tar.gz`
|
||||||
|
|
||||||
|
move to debian/ folder:
|
||||||
|
|
||||||
|
`cd debian`
|
||||||
|
|
||||||
|
remove useless files:
|
||||||
|
|
||||||
|
`rm *.ex *.EX README.Debian README.source `
|
||||||
|
|
||||||
|
edit control file
|
||||||
|
|
||||||
|
`rm control`
|
||||||
|
|
||||||
|
`nano control`
|
||||||
|
|
||||||
|
```
|
||||||
|
Source: iprefresher
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Lukas Heiligenbrunner <lukas@unknown>
|
||||||
|
Build-Depends: debhelper (>= 10)
|
||||||
|
Standards-Version: 4.1.2
|
||||||
|
|
||||||
|
Package: iprefresher
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: a dynu.net ip refresher written in c++
|
||||||
|
a dynu.net ip refresher written in c++
|
||||||
|
```
|
||||||
|
return to main folder
|
||||||
|
|
||||||
|
`cd ..`
|
||||||
|
|
||||||
|
buld .deb package
|
||||||
|
|
||||||
|
`dpkg-buildpackage -us -uc `
|
||||||
|
|
||||||
|
### Windows cross build
|
||||||
|
TODO!
|
@ -9,7 +9,9 @@
|
|||||||
class Logger {
|
class Logger {
|
||||||
public:
|
public:
|
||||||
void logToLogfile(std::string text);
|
void logToLogfile(std::string text);
|
||||||
|
|
||||||
void safeip(std::string ip);
|
void safeip(std::string ip);
|
||||||
|
|
||||||
std::string readip();
|
std::string readip();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -3,38 +3,34 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "API.h"
|
#include "API.h"
|
||||||
|
#include "Hashmap.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <curl/curl.h>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
#include "Hashmap.h"
|
|
||||||
|
|
||||||
std::string API::request(std::string myurl) {
|
std::string API::request(std::string myurl) {
|
||||||
Hashmap<std::string, std::string> map;
|
Hashmap<std::string, std::string> map;
|
||||||
std::vector<std::string> str;
|
std::vector<std::string> str;
|
||||||
|
|
||||||
return request(myurl,false,map,str);
|
return request(std::move(myurl), false, map, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::string> &map, std::vector<std::string> headers) {
|
std::string
|
||||||
|
API::request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers) {
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
|
||||||
|
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
|
|
||||||
struct curl_slist *list = NULL;
|
struct curl_slist *list = nullptr;
|
||||||
for (int j = 0; j < headers.size(); ++j) {
|
for (int j = 0; j < headers.size(); ++j) {
|
||||||
list = curl_slist_append(list, headers.at(j).c_str());
|
list = curl_slist_append(list, headers.at((unsigned long)(j)).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string readString;
|
std::string readString;
|
||||||
if (curl) {
|
if (curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, myurl.c_str());
|
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
|
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
|
||||||
|
|
||||||
|
|
||||||
@ -53,10 +49,10 @@ std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::
|
|||||||
}
|
}
|
||||||
poststring << "}";
|
poststring << "}";
|
||||||
|
|
||||||
// std::cout << "post string: " << poststring.str() << "\n";
|
|
||||||
curl_easy_setopt(curl, CURLOPT_POST, 1);
|
curl_easy_setopt(curl, CURLOPT_POST, 1);
|
||||||
curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, poststring.str().c_str());
|
curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, poststring.str().c_str());
|
||||||
} else {
|
} else {
|
||||||
|
if (map.size() > 0) {
|
||||||
std::string getstring;
|
std::string getstring;
|
||||||
for (int i = 0; i < map.size(); i++) {
|
for (int i = 0; i < map.size(); i++) {
|
||||||
getstring += map.getKey(i) + "=" + map.getValue(i);
|
getstring += map.getKey(i) + "=" + map.getValue(i);
|
||||||
@ -67,13 +63,15 @@ std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::
|
|||||||
|
|
||||||
myurl += "?" + getstring;
|
myurl += "?" + getstring;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, myurl.c_str());
|
||||||
|
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readString);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readString);
|
||||||
|
|
||||||
res = curl_easy_perform(curl);
|
curl_easy_perform(curl);
|
||||||
|
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
}
|
}
|
@ -12,7 +12,8 @@
|
|||||||
class API {
|
class API {
|
||||||
public:
|
public:
|
||||||
std::string request(std::string myurl);
|
std::string request(std::string myurl);
|
||||||
std::string request(std::string myurl, bool post, Hashmap<std::string,std::string> &map,std::vector<std::string> headers);
|
|
||||||
|
std::string request(std::string myurl, bool post, Hashmap<std::string, std::string> &map, std::vector<std::string> &headers);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static size_t write_data(void *buffer, size_t size, size_t buffersize, FILE *stream);
|
static size_t write_data(void *buffer, size_t size, size_t buffersize, FILE *stream);
|
@ -9,10 +9,13 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
template <class keytype,class valuetype> class Hashmap {
|
template<class keytype, class valuetype>
|
||||||
|
class Hashmap {
|
||||||
public:
|
public:
|
||||||
void add(keytype key, keytype value);
|
void add(keytype key, keytype value);
|
||||||
|
|
||||||
keytype getKey(int position);
|
keytype getKey(int position);
|
||||||
|
|
||||||
valuetype getValue(int position);
|
valuetype getValue(int position);
|
||||||
|
|
||||||
int size();
|
int size();
|
||||||
@ -40,7 +43,7 @@ valuetype Hashmap<keytype, valuetype>::getValue(int position) {
|
|||||||
|
|
||||||
template<class keytype, class valuetype>
|
template<class keytype, class valuetype>
|
||||||
int Hashmap<keytype, valuetype>::size() {
|
int Hashmap<keytype, valuetype>::size() {
|
||||||
return keys.size();
|
return (int)(keys.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
16
src/api/TelegramAPI.cpp
Normal file
16
src/api/TelegramAPI.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by lukas on 08.05.19.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "TelegramAPI.h"
|
||||||
|
|
||||||
|
void TelegramAPI::sendMessage(std::string text) {
|
||||||
|
Hashmap<std::string, std::string> args;
|
||||||
|
args.add("chat_id", chatid);
|
||||||
|
args.add("text", text);
|
||||||
|
|
||||||
|
std::vector<std::string> headers;
|
||||||
|
|
||||||
|
std::string reply = request("https://api.telegram.org/bot" + apikey + "/sendmessage", false, args, headers);
|
||||||
|
std::cout << "[DEBUG] " << reply << std::endl;
|
||||||
|
}
|
22
src/api/TelegramAPI.h
Normal file
22
src/api/TelegramAPI.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// Created by lukas on 08.05.19.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef IPREFRESHER_TELEGRAMAPI_H
|
||||||
|
#define IPREFRESHER_TELEGRAMAPI_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include "API.h"
|
||||||
|
|
||||||
|
class TelegramAPI : API {
|
||||||
|
public:
|
||||||
|
void sendMessage(std::string text);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string apikey = "717213769:AAHan1nSXhUsxLJAN1Dv8Oc0z8wqwDdYPn4";
|
||||||
|
std::string chatid = "618154204";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //IPREFRESHER_TELEGRAMAPI_H
|
54
src/main.cpp
54
src/main.cpp
@ -1,49 +1,73 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "API.h"
|
#include "api/API.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
#include "api/TelegramAPI.h"
|
||||||
|
|
||||||
int main() {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
if (argc > 1) {
|
||||||
|
std::string firstarg(argv[1]);
|
||||||
|
if (firstarg == "-h" || firstarg == "--help") {
|
||||||
|
std::cout << "help page: " << std::endl << "[-h] [--help] print this help page" << std::endl
|
||||||
|
<< "[-v] [--version] print the software version" << std::endl
|
||||||
|
<< "[no argument] normal ip check and refresh" << std::endl;
|
||||||
|
} else if (firstarg == "-v" || firstarg == "--version") {
|
||||||
|
std::cout << "Version 1.0" << std::endl;
|
||||||
|
} else {
|
||||||
|
std::cout << "wrong arguments! -h for help" << std::endl;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
API api;
|
API api;
|
||||||
Logger logger;
|
Logger logger;
|
||||||
|
|
||||||
|
|
||||||
std::string ip = api.request("https://api.ipify.org");
|
std::string ip = api.request("https://api.ipify.org");
|
||||||
|
|
||||||
|
if (ip.empty()) {
|
||||||
|
//no internet connection
|
||||||
|
logger.logToLogfile("[WARNING] no internet connection");
|
||||||
|
std::cout << "[WARNING] no internet connection" << std::endl;
|
||||||
|
} else {
|
||||||
std::string oldip = logger.readip();
|
std::string oldip = logger.readip();
|
||||||
|
|
||||||
if (oldip == ip) {
|
if (oldip == ip) {
|
||||||
std::cout << "no change -- ip: " << ip << std::endl;
|
std::cout << "[INFO] no change -- ip: " << ip << std::endl;
|
||||||
logger.logToLogfile("no change -- ip: "+ip);
|
logger.logToLogfile(" [INFO] no change -- ip: " + ip);
|
||||||
} else {
|
} else {
|
||||||
logger.logToLogfile("ip changed! -- from :" + oldip + "to: "+ip);
|
logger.logToLogfile(" [INFO] ip changed! -- from :" + oldip + "to: " + ip);
|
||||||
std::cout << "ip changed! -- from :" << oldip << "to: " << ip << std::endl;
|
std::cout << "[INFO] ip changed! -- from :" << oldip << "to: " << ip << std::endl;
|
||||||
|
|
||||||
//api key: 88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg
|
static std::string dynuapikey = "88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg";
|
||||||
|
|
||||||
|
static std::string domainid = "8506047"; //id of the dynu domain
|
||||||
|
static std::string domainname = "luki.dynu.net";
|
||||||
|
|
||||||
Hashmap<std::string, std::string> args;
|
Hashmap<std::string, std::string> args;
|
||||||
|
args.add("name", domainname);
|
||||||
args.add("name","luki.dynu.net");
|
|
||||||
args.add("ipv4Address", ip);
|
args.add("ipv4Address", ip);
|
||||||
|
|
||||||
std::vector<std::string> headers;
|
std::vector<std::string> headers;
|
||||||
headers.push_back("accept: application/json");
|
headers.push_back("accept: application/json");
|
||||||
headers.push_back("User-Agent: Mozilla/5.0 (compatible; Rigor/1.0.0; http://rigor.com)");
|
headers.push_back("User-Agent: Mozilla/5.0 (compatible; Rigor/1.0.0; http://rigor.com)");
|
||||||
headers.push_back("API-Key: 88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg");
|
headers.push_back("API-Key: " + dynuapikey);
|
||||||
|
|
||||||
std::string dynurepl = api.request("https://api.dynu.com/v2/dns/8506047",true, args,headers);
|
std::string dynurepl = api.request("https://api.dynu.com/v2/dns/" + domainid, true, args, headers);
|
||||||
|
|
||||||
std::cout << "---" << dynurepl << std::endl;
|
std::cout << "[DEBUG] api reply:: " << dynurepl << std::endl;
|
||||||
|
|
||||||
if (dynurepl != "{\"statusCode\":200}") {
|
if (dynurepl != "{\"statusCode\":200}") {
|
||||||
logger.logToLogfile(" [ERROR] failed to write ip to dynu api!");
|
logger.logToLogfile(" [ERROR] failed to write ip to dynu api!");
|
||||||
|
} else {
|
||||||
|
TelegramAPI tele;
|
||||||
|
tele.sendMessage(oldip + " moved to " + ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.safeip(ip);
|
logger.safeip(ip);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Reference in New Issue
Block a user