Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HTTP.sh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laura x Dominika x Patrycja
HTTP.sh
Commits
f9381655
Commit
f9381655
authored
Jan 10, 2021
by
Patrycja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ basic Docker support; todo
parent
fe02fa38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
.dockerignore
.dockerignore
+3
-0
Dockerfile
Dockerfile
+13
-0
http.sh
http.sh
+49
-0
No files found.
.dockerignore
0 → 100644
View file @
f9381655
secret/*
app
config
Dockerfile
0 → 100644
View file @
f9381655
FROM
alpine:3.12
RUN
apk update
\
&&
apk add coreutils
grep
nmap-ncat socat jq bash file curl
WORKDIR
/app
COPY
. .
EXPOSE
1337
VOLUME
/app/config
VOLUME
/app/app
ENTRYPOINT
/app/http.sh
http.sh
View file @
f9381655
#!/bin/bash
trap
ctrl_c INT
if
[[
!
-f
"config/master.sh"
]]
;
then
mkdir
-p
config
cat
<<
PtrcIsCute
> "config/master.sh"
#!/bin/bash
declare -A cfg
cfg[ip]=127.0.0.1 # IP address to bind to - use 0.0.0.0 to bind to all
cfg[http]=true # enables/disables listening on HTTP
cfg[port]=1337 # HTTP port
cfg[namespace]='app'
cfg[root]='webroot/'
cfg[index]='index.shs'
cfg[autoindex]=true
cfg[auth_required]=false
cfg[auth_realm]="Laura is cute <3"
cfg[ssl]=false # enables/disables listening on HTTPS
cfg[ssl_port]=8443
cfg[ssl_cert]=''
cfg[ssl_key]=''
cfg[extension]='shs'
cfg[extra_headers]='server: HTTP.sh/0.94 (devel)'
cfg[title]='HTTP.sh 0.94'
cfg[php_enabled]=false # enable PHP script evalutaion (requires PHP)
cfg[python_enabled]=false # enable Python script evalutaion (requires Python)
cfg[log]='log' # filename
# proxy functionality is very WiP
cfg[proxy]=false
cfg[proxy_url]='http://example.com/'
# mail handler config
cfg[mail]=""
cfg[mail_server]=""
cfg[mail_password]=""
cfg[mail_ssl]=true
cfg[mail_ignore_bad_cert]=false
PtrcIsCute
fi
source
config/master.sh
function
ctrl_c
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment