{"id":18841981,"url":"https://github.com/ahmetozer/looking-glass","last_synced_at":"2025-04-14T07:31:24.707Z","repository":{"id":136065571,"uuid":"266197636","full_name":"ahmetozer/looking-glass","owner":"ahmetozer","description":"Modern Looking Glass System for 21st century","archived":false,"fork":false,"pushed_at":"2020-11-04T21:18:25.000Z","size":394,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T21:21:46.315Z","etag":null,"topics":["arm","containers","curl","docker","docker-container","ipv6","linux","live","looking-glass","mtr","network","network-tools","nslookup","ping","raspberry-pi","traceroute","tracert","whois","whois-lookup"],"latest_commit_sha":null,"homepage":"https://lg.ahmetozer.org","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetozer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T20:04:47.000Z","updated_at":"2025-01-01T18:44:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2046fe0-3073-4731-bf4e-45843d442e25","html_url":"https://github.com/ahmetozer/looking-glass","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Flooking-glass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Flooking-glass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Flooking-glass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Flooking-glass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetozer","download_url":"https://codeload.github.com/ahmetozer/looking-glass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839365,"owners_count":21169800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","containers","curl","docker","docker-container","ipv6","linux","live","looking-glass","mtr","network","network-tools","nslookup","ping","raspberry-pi","traceroute","tracert","whois","whois-lookup"],"created_at":"2024-11-08T02:53:15.639Z","updated_at":"2025-04-14T07:31:24.684Z","avatar_url":"https://github.com/ahmetozer.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Looking Glass\n\nLooking Glass is a simple web interface created to use various network tools over the Web to inspect network or find problem while remote accessing.\nYou can access the demo system at [https://lg.ahmetozer.org](https://lg.ahmetozer.org)\n\n## Features\n\n- Container Support\n\n- Github or Gitlab Pages support\n\n- Inputs can be a IPv4, IPv6 and Domain\n\n- Disable IPv6 or IPv4 query without firewall or routing configuration (It also works on domain).\n\n- Most of the controls also implement in front end to reduce getting any errors from service.\n\n- Server info table\n\n- Live output\n\n- Nested Server list support. You can categorize your servers until depth 5\n\n- Advanced server select modal\n\n- Recursive configuration support\n\n- Rate limit\n\n- Available functions\n  - Ping\n  - Traceroute (tracert)\n  - nslookup\n  - whois\n  - curl\n  - mtr\n\n- Custom navbar links\n\n- Responsive (Mobile supported)\n\n- Automated self certificate generator\n\n- Custom SSL certificate support\n\n- Fully IPv6 Support\n\n## Images\n\n![start](https://raw.githubusercontent.com/ahmetozer/looking-glass/doc-files/img/1_start.jpg)\n\n![server_select_modal](https://raw.githubusercontent.com/ahmetozer/looking-glass/doc-files/img/2_server_select_modal.jpg)\n\n![after_selecting_server](https://raw.githubusercontent.com/ahmetozer/looking-glass/doc-files/img/3_after_selecting_server.jpg)\n\n## Installation\n\nThis software is divided to two part, one of them is web site other one is service side. This is increase flexibility, maintenance and uptime.\n\n### Configure Web Site\n\nThere is a few options are available for website. These options are your company information and some preferences like a custom navbar links.\n\nFor configuration change `_config.yml` preferences. Comments in configuration file is can help for configuration.\n\n### Build Web Site\n\nThere is a few ways to serve your looking glass website.  \n\n#### Github Pages\n\nYou can fork this repository on github, edit _config.yml and build with github pages.  \nGithub pages is also has a Lets Encrypt support. It's automatically generate SSL certificate.\n\nSecond option is use docker container to build your static web site easily without installing or configuring any software dependencies.\n\n#### Self Hosting With Docker Container\n\nGet container from docker.\n\n```bash\ndocker pull ahmetozer/looking-glass\n```\n\nTo run\n\n```bash\ndocker run -it --name looking-glass\n```\n\n##### ADD configure files and Assets (Logo,server.json,_config.yml or ssl certs)\n\nThere is a two options to do it. First one is configure files on your server and overlay files to container with docker volume option while container creating.\n\n```bash\ndocker run -v /my/configs/lg/server.json:/srv/jekyll/server.json ahmetozer/looking-glass\n```\n\nSecond one is mount files into server with readonly mode while container creating. (For example mount a SSL Certificates)  \n**NOTE :** If you don't mount your certificates, system is create a self signed certificate.\n\n```bash\ndocker run -it --name looking-glass --restart always \\\n-e webserver=yes -p 80:80 -p 443:443 \\\n--mount type=bind,source=\"looking-glass.crt\",target=/etc/ssl/certs/looking-glass.crt,readonly \\\n--mount type=bind,source=\"looking-glass.key\",target=/etc/ssl/private/looking-glass.key,readonly \\\nahmetozer/looking-glass\n```\n\nThird one ise add or overwrite files to container with docker cp command after container created.\n\n```bash\ndocker cp .config.yml looking-glass:/srv/jekyll/.config.yml\ndocker cp logo.png looking-glass:/srv/jekyll/logo.png\ndocker cp server.json looking-glass:/srv/jekyll/server.json\ndocker restart looking-glass\n```\n\nAfter editing config or uploading new files, you have to rebuild your static site. It is takes less than 10 second.\n\n```bash\ndocker restart looking-glass\n```\n\n#### Enable Web Server\n\nYou can enable pre configured web server with only set webserver environment variable to yes `-e webserver=\"yes\"`\n\n```bash\ndocker run -it --name looking-glass --restart always \\\n-e webserver=yes -p 80:80 -p 443:443 \\\n--mount type=bind,source=\"looking-glass.crt\",target=/etc/ssl/certs/looking-glass.crt,readonly \\\n--mount type=bind,source=\"looking-glass.key\",target=/etc/ssl/private/looking-glass.key,readonly \\\nahmetozer/looking-glass\n```\n\n**My preferred configuration**\n\n```bash\ndocker run -it --name looking-glass --restart always \\\n-e webserver=yes -p 80:80 -p 443:443 \\\nahmetozer/looking-glass\n\n# Copy SSL certs to container\ndocker cp /etc/letsencrypt/live/example.com/fullchain.pem looking-glass:/etc/ssl/certs/looking-glass.crt\ndocker cp /etc/letsencrypt/live/example.com/privkey.pem looking-glass:/etc/ssl/certs/looking-glass.key\n\n# Overwrite configure files with your configuration\ndocker cp .config.yml looking-glass:/srv/jekyll/.config.yml\ndocker cp server.json looking-glass:/srv/jekyll/server.json\n\n# Copy your company logo to container\ndocker cp logo.png looking-glass:/srv/jekyll/logo.png\n\n# To rebuild website restart container\ndocker restart looking-glass\n\n```\n\n### [Net Tools Service](https://github.com/ahmetozer/net-tools-service)\n\nThis front end project uses [Net Tools Service](https://github.com/ahmetozer/net-tools-service) as a backend service.\nFor more details and configuration information please visit [https://github.com/ahmetozer/net-tools-service](https://github.com/ahmetozer/net-tools-service) to see guideline.\n\n### server.json\n\nThis file contains your server settings and information's.\nIt has a there part. First is ServerConfig, second is Server list and last one is servers.\n\nThis configuration it also has a nested configs. You can define settings at main and change by list or server by server.\n\n#### ServerConfig\n\nIt is your function configs. You can enable or disable functions globally by top of the json.\n\nEvery function is disabled by default for security. If you want to enable it you have to define globally, by list or by server to enable it.\n\nSystem also recursive config replacement support. You can re define ServerConfig in Lists or servers.\n\nFor example you want to enable tracert functions globally but disable in One country except one server. You can follow like a this configuration.\n\n```json\n    {\n    \"ServerConfig\": {\n    ...\n        \"tracert\": \"enabled\",\n    ...\n    },\n    \"Servers\": {\n        \"Netherland\": {\n            \"Description\": \"Servers in Netherland\",\n            \"ServerConfig\": {\n                \"tracert\": \"disabled\"\n            },\n            \"Servers\": {\n                \"Amsterdam1\": {\n                    \"Name\": \"X Company 1\",\n                    \"Url\": \"https://just-a-server\",\n                    \"ServerConfig\": {\n                        \"tracert\": \"enabled\"\n                    }\n                },\n                \"Amsterdam2\": {\n                    \"Name\": \"Y Company 1\",\n                    \"Url\": \"https://just-a-server2\"\n                }\n            }\n```\n\nConfiguration scheme work logic is depth based. System start looks config at top of the config and compare by dept until reach server object.\n\n#### Server List\n\nIt's like a server object except it does not have URL object has a again server object.\n\nBy naming server list object, please be careful to do not use any space, dot or other special characters. You can only use ^[a-zA-Z0-9]+$ characters for server list objects.\n\nSystem use name as Server List Object string but if you want to display different name you can define name object in your list.\n\nIf you want to display description on right side of server select modal, you can define \"Description\" item in your server list object.\n\n```json\n{\n    ...\n\"Servers\": {\n        \"Turkey\": {\n            \"Name\": \"Türkiye\",\n            \"Description\": \"Research and Test Servers\",\n            \"ServerConfig\": {\n                \"whois\": \"disabled\",\n                \"webcontrol\": \"disabled\",\n                \"tcp\": \"disabled\"\n            },\n            \"Servers\": {\n                ...\n            }\n}\n```\n\n#### Servers\n\nYou can use server objects directly in Server list modal or inside of Server Lists.\nAgain while defining you have to use ^[a-zA-Z0-9]+$ characters to prevent any error on website.\nIf you want to show your server name outside of regex, you can again define \"Name\" in your server.\n\nYou can point your Looking glass service with url.\nYou don't have to stick https port 443, you can also use a different port.  \nWhile define url you don't need to add slash end of to url. System automatically added.\n\nTo showing several information on Server Select Modal and server table, please define ASN, IPV4Address and IPV6Address.\n\n```json\n{\n    \"Marmaris1\": {\n        \"Name\": \"Marmaris 1\",\n        \"Description\": \"Turknet LSN\",\n        \"ServerConfig\": {\n            \"whois\": \"enabled\",\n            \"nslookup\": \"enabled\",\n            \"ping\": \"disabled\",\n            \"icmp\": \"enabled\",\n            \"tracert\": \"enabled\",\n            \"webcontrol\": \"enabled\",\n            \"speedtest\": \"enabled\"\n        },\n        \"ASN\": \"AS64496\",\n        \"IPV4Address\": \"203.0.113.3\",\n        \"IPV6Address\": \"2001:db8:900d:c0de::3\",\n        \"Url\": \"https://demo-server-diffrent-port:2083\"\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Flooking-glass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetozer%2Flooking-glass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Flooking-glass/lists"}