Skip to content

Commit

Permalink
fixed: vmess path
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Feb 14, 2024
1 parent 2655983 commit 4494393
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,17 @@ $(document).on('keyup', '#defConfig', function(e) {
$('#grpcMode option').removeAttr('selected');
$('#grpcMode option[value="'+ (defConfig.type
=== 'multi' ? 'multi' : 'gun') +'"]').attr('selected', 'selected').prop('selected', true);
$('#serviceName').val(defConfig.path);
if ( defConfig.net !== 'ws' ) {
$('#serviceName').val(defConfig.path);
}
}
else {
$('#cleanIp').val(defConfig.address);
$('#grpcMode option').removeAttr('selected');
$('#grpcMode option[value="'+ (defConfig.mode === 'multi' ? 'multi' : 'gun') +'"]').attr('selected', 'selected').prop('selected', true);
$('#serviceName').val(defConfig.serviceName);
if ( defConfig.type !== 'ws' ) {
$('#serviceName').val(defConfig.serviceName);
}
}
if ( typeof defConfig.allowInsecure !== "undefined" ) {
if ( protocol === 'vmess' ) {
Expand Down Expand Up @@ -222,7 +226,7 @@ $(document).on('keyup', '#defConfig', function(e) {
if ( stream !== 'ws' ) {
$('#early').prop('checked', false);
}
let path = setPath(defConfig.type === 'ws' ? defConfig.path : "");
let path = setPath(protocol !== 'vmess' && defConfig.type === 'ws' || protocol === 'vmess' && defConfig.net === 'ws' ? defConfig.path : "");
let early = $('#early').is(':checked');
if ( early && stream === 'ws' ) {
path = path+'?ed=2048';
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ <h4 class="modal-title dirLeft">QRCode</h4>
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/lang.js?v1.12.1"></script>
<script src="./assets/js/script.js?v1.12.1"></script>
<script src="./assets/js/script.js?v1.12.2"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit 4494393

Please sign in to comment.