Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
obfs4-deprecated
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
obfs4-deprecated
Commits
697b51b4
Commit
697b51b4
authored
10 years ago
by
Yawning Angel
Browse files
Options
Downloads
Patches
Plain Diff
Fix minor style issues pointed out by golint.
parent
9fe9959c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
obfs4proxy/proxy_http.go
+4
-5
4 additions, 5 deletions
obfs4proxy/proxy_http.go
with
4 additions
and
5 deletions
obfs4proxy/proxy_http.go
+
4
−
5
View file @
697b51b4
...
...
@@ -76,14 +76,14 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
}
// HACK HACK HACK HACK. http.ReadRequest also does this.
reqU
rl
,
err
:=
url
.
Parse
(
"http://"
+
addr
)
reqU
RL
,
err
:=
url
.
Parse
(
"http://"
+
addr
)
if
err
!=
nil
{
conn
.
httpConn
.
Close
()
return
nil
,
err
}
reqU
rl
.
Scheme
=
""
reqU
RL
.
Scheme
=
""
req
,
err
:=
http
.
NewRequest
(
"CONNECT"
,
reqU
rl
.
String
(),
nil
)
req
,
err
:=
http
.
NewRequest
(
"CONNECT"
,
reqU
RL
.
String
(),
nil
)
if
err
!=
nil
{
conn
.
httpConn
.
Close
()
return
nil
,
err
...
...
@@ -120,9 +120,8 @@ func (c *httpConn) Read(b []byte) (int, error) {
if
c
.
staleReader
!=
nil
{
if
c
.
staleReader
.
Buffered
()
>
0
{
return
c
.
staleReader
.
Read
(
b
)
}
else
{
c
.
staleReader
=
nil
}
c
.
staleReader
=
nil
}
return
c
.
hijackedConn
.
Read
(
b
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment